検索

このコンテンツは選択した言語では利用できません。

Chapter 4. Configuration

download PDF

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 では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.