Package com.azure.servicebus.jms
Class ServiceBusJmsConnectionFactorySettings
java.lang.Object
com.azure.servicebus.jms.ServiceBusJmsConnectionFactorySettings
-
Constructor Summary
ConstructorsConstructorDescriptionServiceBusJmsConnectionFactorySettings(long connectionIdleTimeoutMS, boolean traceFrames) ServiceBusJmsConnectionFactorySettings(Map<String, String> configurationOptions) Configure QPID JMS case sensitive options for this ConnectionFactory. -
Method Summary
Modifier and TypeMethodDescriptionlongSupplier<io.netty.handler.proxy.ProxyHandler> longString[]longlongbooleanvoidsetConnectionIdleTimeoutMS(long connectionIdleTimeoutMS) voidsetInitialReconnectDelay(long initialReconnectDelay) voidsetMaxReconnectAttempts(int maxReconnectAttempts) voidsetMaxReconnectDelay(long maxReconnectDelay) voidsetProxyHandlerSupplier(Supplier<io.netty.handler.proxy.ProxyHandler> proxyHandlerSupplier) voidsetQueueAutoDeleteOnIdleDurationInSeconds(long queueAutoDeleteOnIdleDurationInSeconds) voidsetReconnectAmqpOpenServerListAction(ReconnectAmqpOpenServerListAction amqpOpenServerListAction) voidsetReconnectBackOffMultiplier(double reconnectBackOffMultiplier) voidsetReconnectDelay(long reconnectDelay) voidsetReconnectHosts(String[] reconnectHosts) voidsetReconnectRandomize(boolean randomize) voidsetShouldReconnect(boolean shouldReconnect) voidsetStartupMaxReconnectAttempts(int startupMaxReconnectAttempts) voidsetSubscriberAutoDeleteOnIdleDurationInSeconds(long subscriberAutoDeleteOnIdleDurationInSeconds) voidsetTopicAutoDeleteOnIdleDurationInSeconds(long topicAutoDeleteOnIdleDurationInSeconds) voidsetTraceFrames(boolean traceFrames) voidsetUseReconnectBackOff(boolean useReconnectBackOff) voidsetWarnAfterReconnectAttempts(int warnAfterReconnectAttempts) boolean
-
Constructor Details
-
ServiceBusJmsConnectionFactorySettings
public ServiceBusJmsConnectionFactorySettings() -
ServiceBusJmsConnectionFactorySettings
public ServiceBusJmsConnectionFactorySettings(long connectionIdleTimeoutMS, boolean traceFrames) -
ServiceBusJmsConnectionFactorySettings
Configure QPID JMS case sensitive options for this ConnectionFactory. Please see https://qpid.apache.org/releases/qpid-jms-0.41.0/docs/index.html#jms-configuration-options for the complete list of options.
-
-
Method Details
-
getConnectionIdleTimeoutMS
public long getConnectionIdleTimeoutMS() -
setConnectionIdleTimeoutMS
public void setConnectionIdleTimeoutMS(long connectionIdleTimeoutMS) -
getProxyHandlerSupplier
-
setProxyHandlerSupplier
public void setProxyHandlerSupplier(Supplier<io.netty.handler.proxy.ProxyHandler> proxyHandlerSupplier) -
isTraceFrames
public boolean isTraceFrames() -
setTraceFrames
public void setTraceFrames(boolean traceFrames) -
getQueueAutoDeleteOnIdleDurationInSeconds
public long getQueueAutoDeleteOnIdleDurationInSeconds()- Returns:
- the queueAutoDeleteOnIdleDurationInSeconds setting configured for the factory
-
setQueueAutoDeleteOnIdleDurationInSeconds
public void setQueueAutoDeleteOnIdleDurationInSeconds(long queueAutoDeleteOnIdleDurationInSeconds) - Parameters:
queueAutoDeleteOnIdleDurationInSeconds- - the autoDeleteOnIdleDurationInSeconds to be set for all queues created using this factory. If different queues need different AutoDeleteOnIdleDuration settings, use different ServiceBusJmsConnectionFactory to create those queues.
-
getTopicAutoDeleteOnIdleDurationInSeconds
public long getTopicAutoDeleteOnIdleDurationInSeconds()- Returns:
- the topicAutoDeleteOnIdleDurationInSeconds setting configured for the factory
-
setTopicAutoDeleteOnIdleDurationInSeconds
public void setTopicAutoDeleteOnIdleDurationInSeconds(long topicAutoDeleteOnIdleDurationInSeconds) - Parameters:
topicAutoDeleteOnIdleDurationInSeconds- - the autoDeleteOnIdleDurationInSeconds to be set for all topics created using this factory. If different topics need different AutoDeleteOnIdleDuration settings, use different ServiceBusJmsConnectionFactory to create those topics.
-
getSubscriberAutoDeleteOnIdleDurationInSeconds
public long getSubscriberAutoDeleteOnIdleDurationInSeconds()- Returns:
- the subscriberAutoDeleteOnIdleDurationInSeconds setting configured for the factory
-
setSubscriberAutoDeleteOnIdleDurationInSeconds
public void setSubscriberAutoDeleteOnIdleDurationInSeconds(long subscriberAutoDeleteOnIdleDurationInSeconds) - Parameters:
subscriberAutoDeleteOnIdleDurationInSeconds- - the autoDeleteOnIdleDurationInSeconds to be set for all subscriptions created using this factory. If different subscriptions need different AutoDeleteOnIdleDuration settings, use different ServiceBusJmsConnectionFactory to create those subscriptions.
-
getConfigurationOptions
-
shouldReconnect
public boolean shouldReconnect()- Returns:
- True if the reconnect functionalities implement by QPID should be leveraged. Default is true.
-
setShouldReconnect
public void setShouldReconnect(boolean shouldReconnect) - Parameters:
shouldReconnect- True if the reconnect functionalities implement by QPID should be leveraged. Default is true.
-
getReconnectHosts
- Returns:
- The array of ServiceBus hosts that the client should reconnect to in case of a connection failure.
-
setReconnectHosts
- Parameters:
reconnectHosts- The array of ServiceBus hosts that the client should reconnect to in case of a connection failure. An example value is contoso.servicebus.windows.net. Please note that the same SAS keys from the original host will be used upon the reconnct host for authentication.
-
getInitialReconnectDelay
- Returns:
- The amount of time the client will wait before the first attempt to reconnect to a remote peer in milliseconds.
-
setInitialReconnectDelay
public void setInitialReconnectDelay(long initialReconnectDelay) - Parameters:
initialReconnectDelay- The amount of time the client will wait before the first attempt to reconnect to a remote peer in milliseconds. The default value is zero, meaning the first attempt happens immediately.
-
getReconnectDelay
- Returns:
- The delay between successive reconnection attempts in milliseconds.
-
setReconnectDelay
public void setReconnectDelay(long reconnectDelay) - Parameters:
reconnectDelay- The delay between successive reconnection attempts in milliseconds, defaults to 10. If the backoff option is not enabled this value remains constant.
-
getMaxReconnectDelay
- Returns:
- The maximum time that the client will wait before attempting a reconnect in milliseconds.
-
setMaxReconnectDelay
public void setMaxReconnectDelay(long maxReconnectDelay) - Parameters:
maxReconnectDelay- The maximum time that the client will wait before attempting a reconnect in milliseconds, defaults to 30000.
-
useReconnectBackOff
- Returns:
- True if the time between reconnection attempts should grow based on a configured multiplier.
-
setUseReconnectBackOff
public void setUseReconnectBackOff(boolean useReconnectBackOff) - Parameters:
useReconnectBackOff- True if the time between reconnection attempts should grow based on a configured multiplier. This option defaults to true.
-
getReconnectBackOffMultiplier
- Returns:
- The multiplier used to grow the reconnection delay value.
-
setReconnectBackOffMultiplier
public void setReconnectBackOffMultiplier(double reconnectBackOffMultiplier) - Parameters:
reconnectBackOffMultiplier- The multiplier used to grow the reconnection delay value, defaults to 2.0.
-
getMaxReconnectAttempts
- Returns:
- The number of reconnection attempts allowed before reporting the connection as failed to the client.
-
setMaxReconnectAttempts
public void setMaxReconnectAttempts(int maxReconnectAttempts) - Parameters:
maxReconnectAttempts- The number of reconnection attempts allowed before reporting the connection as failed to the client. The default is no limit or (-1).
-
getStartupMaxReconnectAttempts
- Returns:
- For a client that has never connected to a remote peer before this option control how many attempts are made to connect before reporting the connection as failed.
-
setStartupMaxReconnectAttempts
public void setStartupMaxReconnectAttempts(int startupMaxReconnectAttempts) - Parameters:
startupMaxReconnectAttempts- For a client that has never connected to a remote peer before this option control how many attempts are made to connect before reporting the connection as failed. The default is to use the value of maxReconnectAttempts.
-
getWarnAfterReconnectAttempts
- Returns:
- Number of reconnection attempts before the client will log a message indicating that reconnect reconnection is being attempted.
-
setWarnAfterReconnectAttempts
public void setWarnAfterReconnectAttempts(int warnAfterReconnectAttempts) - Parameters:
warnAfterReconnectAttempts- Number of reconnection attempts before the client will log a message indicating that reconnect reconnection is being attempted. The default is to log every 10 connection attempts.
-
shouldReconnectRandomize
- Returns:
- True if the set of reconnect URIs is randomly shuffled prior to attempting to connect to one of them. This can help to distribute client connections more evenly across multiple remote peers.
-
setReconnectRandomize
public void setReconnectRandomize(boolean randomize) - Parameters:
randomize- True if the set of reconnect URIs is randomly shuffled prior to attempting to connect to one of them. This can help to distribute client connections more evenly across multiple remote peers. The default value is false.
-
getReconnectAmqpOpenServerListAction
- Returns:
- Returns how the reconnect transport behaves when the connection Open frame from the remote peer provides a list of reconnect hosts to the client. This option accepts one of three values; REPLACE, ADD, or IGNORE (default is REPLACE). If REPLACE is configured then all reconnect URIs other than the one for the current server are replaced with those provided by the remote peer. If ADD is configured then the URIs provided by the remote are added to the existing set of reconnect URIs, with de-duplication. If IGNORE is configured then any updates from the remote are dropped and no changes are made to the set of reconnect URIs in use.
-
setReconnectAmqpOpenServerListAction
public void setReconnectAmqpOpenServerListAction(ReconnectAmqpOpenServerListAction amqpOpenServerListAction) - Parameters:
amqpOpenServerListAction- Controls how the reconnect transport behaves when the connection Open frame from the remote peer provides a list of reconnect hosts to the client. This option accepts one of three values; REPLACE, ADD, or IGNORE (default is REPLACE). If REPLACE is configured then all reconnect URIs other than the one for the current server are replaced with those provided by the remote peer. If ADD is configured then the URIs provided by the remote are added to the existing set of reconnect URIs, with de-duplication. If IGNORE is configured then any updates from the remote are dropped and no changes are made to the set of reconnect URIs in use.
-