Class EventHubsConfiguration
java.lang.Object
org.apache.camel.component.azure.eventhubs.EventHubsConfiguration
- All Implemented Interfaces:
Cloneable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()com.azure.core.amqp.AmqpRetryOptionsSets the retry policy forEventHubProducerAsyncClient.com.azure.core.amqp.AmqpTransportTypeSets the transport type by which all the communication with Azure Event Hubs occurs.In case you chose the default BlobCheckpointStore, this sets access key for the associated azure account name to be used for authentication with azure blob services.In case you chose the default BlobCheckpointStore, this sets Azure account name to be used for authentication with azure blob services.In case you chose the default BlobCheckpointStore, this sets the blob container that shall be used by the BlobCheckpointStore to store the checkpoint offsets.com.azure.storage.common.StorageSharedKeyCredentialIn case you chose the default BlobCheckpointStore, StorageSharedKeyCredential can be injected to create the azure client, this holds the important authentication information.intintcom.azure.messaging.eventhubs.CheckpointStoreSets theCheckpointStoretheEventProcessorClientwill use for storing partition ownership and checkpoint information.Instead of supplying namespace, sharedAccessKey, sharedAccessName, etc. you can supply the connection string for your eventHub.Sets the name of the consumer group this consumer is associated with.EventHubs name under a specific namespace.Sets the map containing the event position to use for each partition if a checkpoint for the partition does not exist inCheckpointStore.EventHubs namespace created in Azure Portal.Sets the identifier of the Event Hub partition that theEventDataevents will be sent to.Sets a hashing key to be provided for the batch of events, which instructs the Event Hubs service to map this key to a specific partition.intSets the count used by the receiver to control the number of events the Event Hub consumer will actively receive and queue locally without regard to whether a receive operation is currently active.com.azure.messaging.eventhubs.EventHubProducerAsyncClientSets theEventHubProducerAsyncClient.An asynchronous producer responsible for transmittingEventDatato a specific Event Hub, grouped together in batches.The generated value for the SharedAccessName.The name you chose for your EventHubs SAS keys.com.azure.core.credential.TokenCredentialProvide custom authentication credentials using an implementation ofTokenCredential.voidsetAmqpRetryOptions(com.azure.core.amqp.AmqpRetryOptions amqpRetryOptions) voidsetAmqpTransportType(com.azure.core.amqp.AmqpTransportType amqpTransportType) voidsetBlobAccessKey(String blobAccessKey) voidsetBlobAccountName(String blobAccountName) voidsetBlobContainerName(String blobContainerName) voidsetBlobStorageSharedKeyCredential(com.azure.storage.common.StorageSharedKeyCredential blobStorageSharedKeyCredential) voidsetCheckpointBatchSize(int checkpointBatchSize) Sets the batch size between each checkpoint update.voidsetCheckpointBatchTimeout(int checkpointBatchTimeout) Sets the batch timeout between each checkpoint update.voidsetCheckpointStore(com.azure.messaging.eventhubs.CheckpointStore checkpointStore) voidsetConnectionString(String connectionString) voidsetConsumerGroupName(String consumerGroupName) voidsetCredentialType(CredentialType credentialType) Determines the credential strategy to adoptvoidsetEventHubName(String eventHubName) voidsetEventPosition(Map<String, com.azure.messaging.eventhubs.models.EventPosition> eventPosition) voidsetNamespace(String namespace) voidsetPartitionId(String partitionId) voidsetPartitionKey(String partitionKey) voidsetPrefetchCount(int prefetchCount) voidsetProducerAsyncClient(com.azure.messaging.eventhubs.EventHubProducerAsyncClient producerAsyncClient) voidsetSharedAccessKey(String sharedAccessKey) voidsetSharedAccessName(String sharedAccessName) voidsetTokenCredential(com.azure.core.credential.TokenCredential tokenCredential)
-
Constructor Details
-
EventHubsConfiguration
public EventHubsConfiguration()
-
-
Method Details
-
getNamespace
EventHubs namespace created in Azure Portal. -
setNamespace
-
getEventHubName
EventHubs name under a specific namespace. -
setEventHubName
-
getConnectionString
Instead of supplying namespace, sharedAccessKey, sharedAccessName, etc. you can supply the connection string for your eventHub. The connection string for EventHubs already includes all the necessary information to connect to your EventHub. To learn how to generate the connection string, take a look at this documentation: https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-get-connection-string -
setConnectionString
-
getTokenCredential
public com.azure.core.credential.TokenCredential getTokenCredential()Provide custom authentication credentials using an implementation ofTokenCredential. -
setTokenCredential
public void setTokenCredential(com.azure.core.credential.TokenCredential tokenCredential) -
getAmqpTransportType
public com.azure.core.amqp.AmqpTransportType getAmqpTransportType()Sets the transport type by which all the communication with Azure Event Hubs occurs. -
setAmqpTransportType
public void setAmqpTransportType(com.azure.core.amqp.AmqpTransportType amqpTransportType) -
getAmqpRetryOptions
public com.azure.core.amqp.AmqpRetryOptions getAmqpRetryOptions()Sets the retry policy forEventHubProducerAsyncClient. If not specified, the default retry options are used. -
setAmqpRetryOptions
public void setAmqpRetryOptions(com.azure.core.amqp.AmqpRetryOptions amqpRetryOptions) -
getConsumerGroupName
Sets the name of the consumer group this consumer is associated with. Events are read in the context of this group. The name of the consumer group that is created by default is $Default. -
setConsumerGroupName
-
getPrefetchCount
public int getPrefetchCount()Sets the count used by the receiver to control the number of events the Event Hub consumer will actively receive and queue locally without regard to whether a receive operation is currently active. -
setPrefetchCount
public void setPrefetchCount(int prefetchCount) -
getProducerAsyncClient
public com.azure.messaging.eventhubs.EventHubProducerAsyncClient getProducerAsyncClient()Sets theEventHubProducerAsyncClient.An asynchronous producer responsible for transmittingEventDatato a specific Event Hub, grouped together in batches. Depending on theCreateBatchOptionsoptions specified when creating anEventDataBatch, the events may be automatically routed to an available partition or specific to a partition. Use by this component to produce the data in camel producer. -
setProducerAsyncClient
public void setProducerAsyncClient(com.azure.messaging.eventhubs.EventHubProducerAsyncClient producerAsyncClient) -
getPartitionId
Sets the identifier of the Event Hub partition that theEventDataevents will be sent to. If the identifier is not specified, the Event Hubs service will be responsible for routing events that are sent to an available partition. -
setPartitionId
-
getPartitionKey
Sets a hashing key to be provided for the batch of events, which instructs the Event Hubs service to map this key to a specific partition. The selection of a partition is stable for a given partition hashing key. Should any other batches of events be sent using the same exact partition hashing key, the Event Hubs service will route them all to the same partition. This should be specified only when there is a need to group events by partition, but there is flexibility into which partition they are routed. If ensuring that a batch of events is sent only to a specific partition, it is recommended that the identifier of the position be specified directly when sending the batch. -
setPartitionKey
-
getCheckpointStore
public com.azure.messaging.eventhubs.CheckpointStore getCheckpointStore()Sets theCheckpointStoretheEventProcessorClientwill use for storing partition ownership and checkpoint information.Users can, optionally, provide their own implementation of
By default, it's set to useCheckpointStorewhich will store ownership and checkpoint information.BlobCheckpointStorewhich stores all checkpoint offsets into Azure Blob Storage. -
setCheckpointStore
public void setCheckpointStore(com.azure.messaging.eventhubs.CheckpointStore checkpointStore) -
getBlobAccountName
In case you chose the default BlobCheckpointStore, this sets Azure account name to be used for authentication with azure blob services. -
setBlobAccountName
-
getBlobAccessKey
In case you chose the default BlobCheckpointStore, this sets access key for the associated azure account name to be used for authentication with azure blob services. -
setBlobAccessKey
-
getBlobContainerName
In case you chose the default BlobCheckpointStore, this sets the blob container that shall be used by the BlobCheckpointStore to store the checkpoint offsets. -
setBlobContainerName
-
getEventPosition
Sets the map containing the event position to use for each partition if a checkpoint for the partition does not exist inCheckpointStore. This map is keyed off of the partition id. If there is no checkpoint inCheckpointStoreand there is no entry in this map, the processing of the partition will start fromEventPosition.latest()position. -
setEventPosition
-
getCheckpointBatchSize
public int getCheckpointBatchSize() -
setCheckpointBatchSize
public void setCheckpointBatchSize(int checkpointBatchSize) Sets the batch size between each checkpoint update. Works jointly withcheckpointBatchTimeout. -
getCheckpointBatchTimeout
public int getCheckpointBatchTimeout() -
setCheckpointBatchTimeout
public void setCheckpointBatchTimeout(int checkpointBatchTimeout) Sets the batch timeout between each checkpoint update. Works jointly withcheckpointBatchSize. -
getCredentialType
-
setCredentialType
Determines the credential strategy to adopt -
copy
-