이 콘텐츠는 선택한 언어로 제공되지 않습니다.

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 an IllegalStateException if no session is available.

amqphub.amqp10jms.pool.blockIfSessionPoolIsFullTimeout
The time in milliseconds before a blocked call to createSession() throws an IllegalStateException. 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 to createProducer(). It is enabled by default.

In rare cases, this behavior is undesirable. If disabled, every call to createProducer() results in a new MessageProducer instance.

amqphub.amqp10jms.pool.explicitProducerCacheSize
When not using anonymous producers, the JMS Session can be configured to cache a certain number of MessageProducer 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 the JMSContext API are not managed by the pool.

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.