Class ServiceBusConfiguration
- java.lang.Object
-
- org.apache.camel.component.azure.servicebus.ServiceBusConfiguration
-
-
Constructor Summary
Constructors Constructor Description ServiceBusConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceBusConfiguration
copy()
com.azure.core.amqp.AmqpRetryOptions
getAmqpRetryOptions()
Sets the retry options for Service Bus clients.com.azure.core.amqp.AmqpTransportType
getAmqpTransportType()
Sets the transport type by which all the communication with Azure Service Bus occurs.com.azure.core.util.ClientOptions
getClientOptions()
Sets theClientOptions
to be sent from the client built from this builder, enabling customization of certain properties, as well as support the addition of custom header information.String
getConnectionString()
Sets the connection string for a Service Bus namespace or a specific Service Bus resource.ServiceBusConsumerOperationDefinition
getConsumerOperation()
Sets the desired operation to be used in the consumerString
getFullyQualifiedNamespace()
Fully Qualified Namespace of the service busDuration
getMaxAutoLockRenewDuration()
Sets the amount of time to continue auto-renewing the lock.Integer
getPeekNumMaxMessages()
Set the max number of messages to be peeked during the peek operation.int
getPrefetchCount()
Sets the prefetch count of the receiver.ServiceBusProducerOperationDefinition
getProducerOperation()
Sets the desired operation to be used in the producercom.azure.core.amqp.ProxyOptions
getProxyOptions()
Sets the proxy configuration to use forServiceBusSenderAsyncClient
.com.azure.messaging.servicebus.ServiceBusReceiverAsyncClient
getReceiverAsyncClient()
Sets the receiverAsyncClient in order to consume messages by the consumerOffsetDateTime
getScheduledEnqueueTime()
Sets OffsetDateTime at which the message should appear in the Service Bus queue or topic.com.azure.messaging.servicebus.ServiceBusSenderAsyncClient
getSenderAsyncClient()
Sets SenderAsyncClient to be used in the producer.com.azure.messaging.servicebus.models.ServiceBusReceiveMode
getServiceBusReceiveMode()
Sets the receive mode for the receiver.com.azure.messaging.servicebus.ServiceBusTransactionContext
getServiceBusTransactionContext()
Represents transaction in service.ServiceBusType
getServiceBusType()
The service bus type of connection to execute.com.azure.messaging.servicebus.models.SubQueue
getSubQueue()
Sets the type of theSubQueue
to connect to.String
getSubscriptionName()
Sets the name of the subscription in the topic to listen to.com.azure.core.credential.TokenCredential
getTokenCredential()
ATokenCredential
for Azure AD authentication, implemented incom.azure.identity
String
getTopicOrQueueName()
Selected topic name or the queue name, that is depending on serviceBusType config.boolean
isDisableAutoComplete()
Disables auto-complete and auto-abandon of received messages.void
setAmqpRetryOptions(com.azure.core.amqp.AmqpRetryOptions amqpRetryOptions)
void
setAmqpTransportType(com.azure.core.amqp.AmqpTransportType amqpTransportType)
void
setClientOptions(com.azure.core.util.ClientOptions clientOptions)
void
setConnectionString(String connectionString)
void
setConsumerOperation(ServiceBusConsumerOperationDefinition consumerOperation)
void
setDisableAutoComplete(boolean disableAutoComplete)
void
setFullyQualifiedNamespace(String fullyQualifiedNamespace)
void
setMaxAutoLockRenewDuration(Duration maxAutoLockRenewDuration)
void
setPeekNumMaxMessages(Integer peekNumMaxMessages)
void
setPrefetchCount(int prefetchCount)
void
setProducerOperation(ServiceBusProducerOperationDefinition producerOperation)
void
setProxyOptions(com.azure.core.amqp.ProxyOptions proxyOptions)
void
setReceiverAsyncClient(com.azure.messaging.servicebus.ServiceBusReceiverAsyncClient receiverAsyncClient)
void
setScheduledEnqueueTime(OffsetDateTime scheduledEnqueueTime)
void
setSenderAsyncClient(com.azure.messaging.servicebus.ServiceBusSenderAsyncClient senderAsyncClient)
void
setServiceBusReceiveMode(com.azure.messaging.servicebus.models.ServiceBusReceiveMode serviceBusReceiveMode)
void
setServiceBusTransactionContext(com.azure.messaging.servicebus.ServiceBusTransactionContext serviceBusTransactionContext)
void
setServiceBusType(ServiceBusType serviceBusType)
void
setSubQueue(com.azure.messaging.servicebus.models.SubQueue subQueue)
void
setSubscriptionName(String subscriptionName)
void
setTokenCredential(com.azure.core.credential.TokenCredential tokenCredential)
void
setTopicOrQueueName(String topicOrQueueName)
-
-
-
Method Detail
-
getTopicOrQueueName
public String getTopicOrQueueName()
Selected topic name or the queue name, that is depending on serviceBusType config. For example if serviceBusType=queue, then this will be the queue name and if serviceBusType=topic, this will be the topic name.
-
setTopicOrQueueName
public void setTopicOrQueueName(String topicOrQueueName)
-
getServiceBusType
public ServiceBusType getServiceBusType()
The service bus type of connection to execute. Queue is for typical queue option and topic for subscription based model.
-
setServiceBusType
public void setServiceBusType(ServiceBusType serviceBusType)
-
getConnectionString
public String getConnectionString()
Sets the connection string for a Service Bus namespace or a specific Service Bus resource.
-
setConnectionString
public void setConnectionString(String connectionString)
-
getSubscriptionName
public String getSubscriptionName()
Sets the name of the subscription in the topic to listen to. topicOrQueueName and serviceBusType=topic must also be set. This property is required if serviceBusType=topic and the consumer is in use.
-
setSubscriptionName
public void setSubscriptionName(String subscriptionName)
-
getClientOptions
public com.azure.core.util.ClientOptions getClientOptions()
Sets theClientOptions
to be sent from the client built from this builder, enabling customization of certain properties, as well as support the addition of custom header information. Refer to theClientOptions
documentation for more information.
-
setClientOptions
public void setClientOptions(com.azure.core.util.ClientOptions clientOptions)
-
getProxyOptions
public com.azure.core.amqp.ProxyOptions getProxyOptions()
Sets the proxy configuration to use forServiceBusSenderAsyncClient
. When a proxy is configured,AmqpTransportType.AMQP_WEB_SOCKETS
must be used for the transport type.
-
setProxyOptions
public void setProxyOptions(com.azure.core.amqp.ProxyOptions proxyOptions)
-
getAmqpRetryOptions
public com.azure.core.amqp.AmqpRetryOptions getAmqpRetryOptions()
Sets the retry options for Service Bus clients. If not specified, the default retry options are used.
-
setAmqpRetryOptions
public void setAmqpRetryOptions(com.azure.core.amqp.AmqpRetryOptions amqpRetryOptions)
-
getAmqpTransportType
public com.azure.core.amqp.AmqpTransportType getAmqpTransportType()
Sets the transport type by which all the communication with Azure Service Bus occurs. Default value isAmqpTransportType.AMQP
.
-
setAmqpTransportType
public void setAmqpTransportType(com.azure.core.amqp.AmqpTransportType amqpTransportType)
-
getReceiverAsyncClient
public com.azure.messaging.servicebus.ServiceBusReceiverAsyncClient getReceiverAsyncClient()
Sets the receiverAsyncClient in order to consume messages by the consumer
-
setReceiverAsyncClient
public void setReceiverAsyncClient(com.azure.messaging.servicebus.ServiceBusReceiverAsyncClient receiverAsyncClient)
-
isDisableAutoComplete
public boolean isDisableAutoComplete()
Disables auto-complete and auto-abandon of received messages. By default, a successfully processed message iscompleted
. If an error happens when the message is processed, it isabandoned
.
-
setDisableAutoComplete
public void setDisableAutoComplete(boolean disableAutoComplete)
-
getServiceBusReceiveMode
public com.azure.messaging.servicebus.models.ServiceBusReceiveMode getServiceBusReceiveMode()
Sets the receive mode for the receiver.
-
setServiceBusReceiveMode
public void setServiceBusReceiveMode(com.azure.messaging.servicebus.models.ServiceBusReceiveMode serviceBusReceiveMode)
-
getMaxAutoLockRenewDuration
public Duration getMaxAutoLockRenewDuration()
Sets the amount of time to continue auto-renewing the lock. SettingDuration.ZERO
ornull
disables auto-renewal. ForRECEIVE_AND_DELETE
mode, auto-renewal is disabled.
-
setMaxAutoLockRenewDuration
public void setMaxAutoLockRenewDuration(Duration maxAutoLockRenewDuration)
-
getPrefetchCount
public int getPrefetchCount()
Sets the prefetch count of the receiver. For bothPEEK_LOCK
andRECEIVE_AND_DELETE
modes the default value is 1. Prefetch speeds up the message flow by aiming to have a message readily available for local retrieval when and before the application asks for one usingServiceBusReceiverAsyncClient.receiveMessages()
. Setting a non-zero value will prefetch that number of messages. Setting the value to zero turns prefetch off.
-
setPrefetchCount
public void setPrefetchCount(int prefetchCount)
-
getSubQueue
public com.azure.messaging.servicebus.models.SubQueue getSubQueue()
Sets the type of theSubQueue
to connect to.
-
setSubQueue
public void setSubQueue(com.azure.messaging.servicebus.models.SubQueue subQueue)
-
getSenderAsyncClient
public com.azure.messaging.servicebus.ServiceBusSenderAsyncClient getSenderAsyncClient()
Sets SenderAsyncClient to be used in the producer.
-
setSenderAsyncClient
public void setSenderAsyncClient(com.azure.messaging.servicebus.ServiceBusSenderAsyncClient senderAsyncClient)
-
getFullyQualifiedNamespace
public String getFullyQualifiedNamespace()
Fully Qualified Namespace of the service bus
-
setFullyQualifiedNamespace
public void setFullyQualifiedNamespace(String fullyQualifiedNamespace)
-
getTokenCredential
public com.azure.core.credential.TokenCredential getTokenCredential()
ATokenCredential
for Azure AD authentication, implemented incom.azure.identity
-
setTokenCredential
public void setTokenCredential(com.azure.core.credential.TokenCredential tokenCredential)
-
getConsumerOperation
public ServiceBusConsumerOperationDefinition getConsumerOperation()
Sets the desired operation to be used in the consumer
-
setConsumerOperation
public void setConsumerOperation(ServiceBusConsumerOperationDefinition consumerOperation)
-
getProducerOperation
public ServiceBusProducerOperationDefinition getProducerOperation()
Sets the desired operation to be used in the producer
-
setProducerOperation
public void setProducerOperation(ServiceBusProducerOperationDefinition producerOperation)
-
getServiceBusTransactionContext
public com.azure.messaging.servicebus.ServiceBusTransactionContext getServiceBusTransactionContext()
Represents transaction in service. This object just contains transaction id.
-
setServiceBusTransactionContext
public void setServiceBusTransactionContext(com.azure.messaging.servicebus.ServiceBusTransactionContext serviceBusTransactionContext)
-
getScheduledEnqueueTime
public OffsetDateTime getScheduledEnqueueTime()
Sets OffsetDateTime at which the message should appear in the Service Bus queue or topic.
-
setScheduledEnqueueTime
public void setScheduledEnqueueTime(OffsetDateTime scheduledEnqueueTime)
-
getPeekNumMaxMessages
public Integer getPeekNumMaxMessages()
Set the max number of messages to be peeked during the peek operation.
-
setPeekNumMaxMessages
public void setPeekNumMaxMessages(Integer peekNumMaxMessages)
-
copy
public ServiceBusConfiguration copy()
-
-