Skip to content

TrimbleCloud.Events

TrimbleCloud.Events.Model

Represents a common event in the system.

Gets or sets additional fields associated with the event.

Gets or sets the client ID associated with the event.

Gets or sets the connection ID associated with the event.

Gets or sets the time when the event was queued for consumption.

Gets or sets the time when the event was consumed.

Gets or sets the name of the event.

Gets or sets the version of the event.

Gets or sets the JWT token associated with the event.

Gets or sets the namespace of the event.

Gets or sets the unique key of the Event Product.

Gets or sets the time when the event was queued for publishing.

Gets or sets the time when the event was published.

TrimbleCloud.Events.Model

Represents an exception that is thrown when a connection is closed.

Initializes a new instance of the ConnectionClosedException class with the specified error message.

Name Type Description
message System.String The error message that explains the reason for the exception.

TrimbleCloud.Events.Model

Represents an event that is consumed by a consumer.

Gets or sets the creation time of the consumed event.

Gets or sets the model version of the consumed event.

Gets or sets the visibility timeout of the consumed event.

A period of time to prevent the consumer from receiving and processing the message. Minimum value = 3 seconds. Maximum value = 60 minutes.

Creates a shallow copy of the ConsumeEvent object.

A shallow copy of the ConsumeEvent object.

This method has no parameters.

TrimbleCloud.Events.Model

Represents an exception that occurs during event consumption by a consumer.

Initializes a new instance of the ConsumerException class with the specified error message.

Name Type Description
message System.String The error message that explains the reason for the exception.

Initializes a new instance of the ConsumerException class with the specified error message and consumed event.

Name Type Description
message System.String The error message that explains the reason for the exception.
consumeEvent TrimbleCloud.Events.Model.ConsumeEvent The consumed event associated with the exception.

Gets the consumed event associated with the exception.

TrimbleCloud.Events.Model

Represents a batch of events.

Gets or sets the creation time of the events batch.

Gets or sets the list of events.

Gets or sets the ID of the events batch.

Gets or sets the model version.

Gets or sets the published time of the events batch.

Gets or sets the queue time of the events batch.

Gets or sets the number of times the event batch has been retried.

Creates a shallow copy of the events batch.

A new instance of the EventsBatch class with a shallow copy of the events.

This method has no parameters.

TrimbleCloud.Events

Represents a client for interacting with the Events Service.

Private constructor constructor used internally

This constructor has no parameters.

Default constructor

This constructor has no parameters.

Constructor used for unit testing

This constructor has no parameters.

Return whether the Events Service connection is active.

Whether the Events Service connection is active or not.

Gets the connection status of the EventsClient.

Return the status of Events Service connection.

The status of the Events Service connection.

Method to explicitly acknowledge the message using acknowledgmentId

Name Type Description
acknowledgmentId System.String Acknowledgment Id of the response

Private function to close connection by stopping batcher, publisher and web socket connection Specified whether to wait for connection

This method has no parameters.

Closes the connection to the events service asynchronously.

A task representing the asynchronous operation. The task result contains a list of published events.

This method has no parameters.

Invoke callback function on message, acknowledgement and exception

This method has no parameters.

Process websocket message on receive

This method has no parameters.

Polls for events to consume.

Name Type Description
consumeEvent TrimbleCloud.Events.Model.ConsumeEvent The consume event configuration.

Publishes a message to the server.

Name Type Description
publishEvent TrimbleCloud.Events.Model.PublishEvent The event to be published.
Name Description
TrimbleCloud.Events.Model.ConnectionClosedException Thrown when the client is already closed.
TrimbleCloud.Events.Model.PublisherException Thrown when batching is disabled.

Setup callback methods for web socket client and start connection

This method has no parameters.

Setup publisher and batcher based on Wokflow

This method has no parameters.

TrimbleCloud.Events

Config required to create Events Client

Gets or sets the number of times to retry sending an acknowledgement.

Gets or sets the wait time in milliseconds for acknowledging events.

Gets or sets the Trimble Identity Token URL for authentication.

Gets or sets the batch buffer time in milliseconds.

Gets or sets the batch buffer size.

Gets or sets the batch expiry time in milliseconds.

Gets or sets a value indicating whether the client acknowledges the events.

Gets or sets the client ID.

Gets or sets the client secret used for authentication.

Gets or sets the number of times the connection should be retried in case of failure.

Gets or sets a value indicating whether batch processing is enabled.

Gets or sets the endpoint URI for the events client.

Gets or sets the logger used for logging events.

Gets or sets the metric registry for tracking metrics.

Gets or sets the TID scope.

Gets or sets the workflow associated with the events client configuration.

TrimbleCloud.Events

Validates the configuration for the EventsClient.

TrimbleCloud.Events

Represents a client for interacting with events in the Trimble Cloud.

Gets a value indicating whether the client is active.

Gets a value indicating whether the client is connected to the server.

Gets the current connection status of the WebSocket client.

Acknowledges the receipt of an event with the specified acknowledgment ID.

Name Type Description
acknowledgmentId System.String The ID of the event to be acknowledged.

Closes the connection to the server and returns a list of published events that were not acknowledged.

A task representing the asynchronous operation.

This method has no parameters.

Starts polling for events from the server and consumes them using the specified event consumer.

Name Type Description
consumeEvent TrimbleCloud.Events.Model.ConsumeEvent The event consumer that will process the received events.

Publishes a message to the server.

Name Type Description
publishEvent TrimbleCloud.Events.Model.PublishEvent The event to be published.

Sends a batch of events to the server.

Name Type Description
batch TrimbleCloud.Events.Model.EventsBatch The batch of events to be sent.

TrimbleCloud.Events.Service

IMetric interface for metric collection. Use this to configure the metric collector client for publishing real-time metrics if needed.

Sets total Batch size

Name Type Description
batchSize System.Int32

ConsumerAckResponseTime(responseTime) method

Section titled “ConsumerAckResponseTime(responseTime) method”

Sets Consumer Ack Response time

Name Type Description
responseTime System.Double

Increments the Ack received by 1

This method has no parameters.

Increment the batch expired by 1

This method has no parameters.

Increments the batch produced by 1

This method has no parameters.

Increments the batch resent by 1

This method has no parameters.

Increments the batch sent by 1

This method has no parameters.

Increments error occurred by 1

This method has no parameters.

Increments event consumed by 1

This method has no parameters.

Increments event produced by 1

This method has no parameters.

Increments if any server disconnect by 1

This method has no parameters.

Sets event published queued time

Name Type Description
queuedTime System.Double

TrimbleCloud.Events.Model

Represents an exception that occurs in a service.

Gets the error message associated with the exception.

TrimbleCloud.Events.Model

Represents a response from Kafka.

Gets or sets the acknowledgment ID.

Gets or sets the entity ID.

Gets or sets the message.

TrimbleCloud.Events.Model

Represents the available metric recorders.

TrimbleCloud.Events.Model

Represents a publish event in the system.

Gets or sets the ID of the entity.

Gets or sets the feedback for the event.

Gets or sets the ID of the event.

Gets or sets the payload of the event.

Gets or sets the name of the topic.

Creates a shallow copy of the PublishEvent instance.

A shallow copy of the PublishEvent instance.

This method has no parameters.

TrimbleCloud.Events.Model

Represents an exception that occurs during publishing events.

Initializes a new instance of the PublisherException class with the specified error message.

Name Type Description
message System.String The error message that explains the reason for the exception.

Initializes a new instance of the PublisherException class with the specified error message and events batch.

Name Type Description
message System.String The error message that explains the reason for the exception.
batch TrimbleCloud.Events.Model.EventsBatch The batch of events associated with the exception.

Gets the batch of events associated with the exception.

TrimbleCloud.Events.Model

Represents a response object.

Gets or sets the service exception.

Gets or sets the service response.

TrimbleCloud.Events.Model

Represents a server request.

Gets or sets the data for the server request.

Gets or sets the type of the server request.

TrimbleCloud.Events.Model

Represents an exception that occurs in the service layer.

Initializes a new instance of the ServiceException class with a specified error message.

Name Type Description
message System.String The error message that explains the reason for the exception.

Gets the error message that describes the current exception.

TrimbleCloud.Events.Model

Represents a service response.

Gets or sets the acknowledgment ID of the response.

Gets or sets the client ID.

Gets or sets the connection ID.

Gets or sets the consumer group ID.

Represents a consumer request for an event.

Gets or sets the error message.

Gets or sets the list of received response messages.

Gets or sets the response type.

Gets or sets the UUID.

TrimbleCloud.Events.Model

Represents an exception that occurs when there is a validation error in the service.

Initializes a new instance of the ValidationException class with the specified error message.

Name Type Description
message System.String The error message that explains the reason for the exception.

TrimbleCloud.Events.Service

Constructor used for unit testing

This constructor has no parameters.

TrimbleCloud.Events.Model

Represents the state of a WebSocket client.

TrimbleCloud.Events.Model

Represents the workflow type.