Class ServiceBusConfiguration

  • All Implemented Interfaces:
    Cloneable

    @UriParams
    public class ServiceBusConfiguration
    extends Object
    implements Cloneable
    • Constructor Detail

      • ServiceBusConfiguration

        public ServiceBusConfiguration()
    • 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 the ClientOptions 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 the ClientOptions 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 for ServiceBusSenderAsyncClient. 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 is AmqpTransportType.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 is completed. If an error happens when the message is processed, it is abandoned.
      • 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. Setting Duration.ZERO or null disables auto-renewal. For RECEIVE_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 both PEEK_LOCK and RECEIVE_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 using ServiceBusReceiverAsyncClient.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 the SubQueue 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()
        A TokenCredential for Azure AD authentication, implemented in com.azure.identity
      • setTokenCredential

        public void setTokenCredential​(com.azure.core.credential.TokenCredential tokenCredential)
      • 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)