このコンテンツは選択した言語では利用できません。
Chapter 4. Configuration
The following options can be used in an application-properties
file to configure your Spring Boot application.
4.1. Connection options
These options determine how AMQ Spring Boot Starter establishes connections to remote AMQP peers. The starter uses AMQ JMS to communicate over the network. For more information, see Using the AMQ JMS Client.
- amqphub.amqp10jms.remoteUrl
The connection URI that the AMQ JMS client uses to establish new connections.
Connection URI format
amqp[s]://host:port[?option=value[&option2=value...]]
For more information, see Connection URIs in Using the AMQ JMS Client.
- amqphub.amqp10jms.username
- The username used to authenticate the connection.
- amqphub.amqp10jms.password
- The password used to authenticate the connection.
- amqphub.amqp10jms.clientId
- The client ID applied to the connection.
- amqphub.amqp10jms.receiveLocalOnly
-
If enabled, calls to
receive
with a timeout argument check the consumer’s local message buffer only. Otherwise, the remote peer is checked as well to ensure there are no messages available. It is disabled by default. - amqphub.amqp10jms.receiveNoWaitLocalOnly
-
If enabled, calls to
receiveNoWait
check the consumer’s local message buffer only. Otherwise, the remote peer is checked as well to ensure there are no messages available. It is disabled by default.
4.2. Pooling options
These options determine how AMQ Spring Boot Starter caches JMS connections and sessions. The starter uses AMQ JMS Pool for its pooling. For more information, see Using the AMQ JMS Pool Library.
- amqphub.amqp10jms.pool.enabled
- Controls whether pooling is enabled. It is disabled by default.
- amqphub.amqp10jms.pool.maxConnections
- The maximum number of connections for a single pool. The default is 1.
- amqphub.amqp10jms.pool.maxSessionsPerConnection
The maximum number of sessions for each connection. The default is 500. A negative value removes any limit.
If the limit is exceeded,
createSession()
either blocks or throws an exception, depending on configuration.- amqphub.amqp10jms.pool.blockIfSessionPoolIsFull
If enabled, calls to
createSession()
block until a session becomes available in the pool. It is enabled by default.If disabled, calls to
createSession()
throw anIllegalStateException
if no session is available.- amqphub.amqp10jms.pool.blockIfSessionPoolIsFullTimeout
-
The time in milliseconds before a blocked call to
createSession()
throws anIllegalStateException
. The default is -1, meaning the call blocks forever. - amqphub.amqp10jms.pool.connectionIdleTimeout
- The time in milliseconds before a connection not currently on loan can be evicted from the pool. The default is 30 seconds. A value of 0 disables the timeout.
- amqphub.amqp10jms.pool.connectionCheckInterval
- The time in milliseconds between periodic checks for expired connections. The default is 0, meaning the check is disabled.
- amqphub.amqp10jms.pool.useAnonymousProducers
If enabled, use a single anonymous JMS
MessageProducer
for all calls tocreateProducer()
. It is enabled by default.In rare cases, this behavior is undesirable. If disabled, every call to
createProducer()
results in a newMessageProducer
instance.- amqphub.amqp10jms.pool.explicitProducerCacheSize
-
When not using anonymous producers, the JMS
Session
can be configured to cache a certain number ofMessageProducer
objects with explicit destinations. As new producers are created that do not match the cached producers, the oldest entry in the cache is evicted. - amqphub.amqp10jms.pool.useProviderJMSContext
If enabled, use the
JMSContext
classes of the underlying JMS provider. It is disabled by default.In normal operation, the pool uses its own generic
JMSContext
implementation to wrap connections from the pool instead of using the provider implementation. The generic implementation might have limitations the provider implementation does not. However, when enabled, connections from theJMSContext
API are not managed by the pool.