검색

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

Chapter 5. Configuration options

download PDF

This chapter lists the available configuration options for AMQ OpenWire JMS.

JMS configuration options are set as query parameters on the connection URI. For more information, see Section 4.3, “Connection URIs”.

5.1. JMS options

jms.username
The user name the client uses to authenticate the connection.
jms.password
The password the client uses to authenticate the connection.
jms.clientID
The client ID that the client applies to the connection.
jms.closeTimeout
The timeout in milliseconds for JMS close operations. The default is 15000 (15 seconds).
jms.connectResponseTimeout
The timeout in milliseconds for JMS connect operations. The default is 0, meaning no timeout.
jms.sendTimeout
The timeout in milliseconds for JMS send operations. The default is 0, meaning no timeout.
jms.checkForDuplicates
If enabled, ignore duplicate messages. It is enabled by default.
jms.disableTimeStampsByDefault
If enabled, do not timestamp messages. It is disabled by default.
jms.useAsyncSend
If enabled, send messages without waiting for acknowledgment. It is disabled by default.
jms.alwaysSyncSend
If enabled, send waits for acknowledgment in all delivery modes. It is disabled by default.
jms.useCompression
If enabled, compress message bodies. It is disabled by default.
jms.useRetroactiveConsumer
If enabled, non-durable subscribers can receive messages that were published before the subscription started. It is disabled by default.

Prefetch policy options

Prefetch policy determines how many messages each MessageConsumer fetches from the remote peer and holds in a local "prefetch" buffer.

jms.prefetchPolicy.queuePrefetch
The number of messages to prefetch for queues. The default is 1000.
jms.prefetchPolicy.queueBrowserPrefetch
The number of messages to prefetch for queue browsers. The default is 500.
jms.prefetchPolicy.topicPrefetch
The number of messages to prefetch for non-durable topics. The default is 32766.
jms.prefetchPolicy.durableTopicPrefetch
The number of messages to prefetch for durable topics. The default is 100.
jms.prefetchPolicy.all
This can be used to set all prefetch values at once.

The value of prefetch can affect the distribution of messages to multiple consumers on a queue. A higher value can result in larger batches sent at once to each consumer. To achieve more even round-robin distribution when consumers operate at different rates, use a lower value.

Redelivery policy options

Redelivery policy controls how redelivered messages are handled on the client.

jms.redeliveryPolicy.maximumRedeliveries
The number of times redelivery is attempted before the message is sent to the dead letter queue. The default is 6. -1 means no limit.
jms.redeliveryPolicy.redeliveryDelay
The time in milliseconds between redelivery attempts. This is used if initialRedeliveryDelay is 0. The default is 1000 (1 second).
jms.redeliveryPolicy.initialRedeliveryDelay
The time in milliseconds before the first redelivery attempt. The default is 1000 (1 second).
jms.redeliveryPolicy.maximumRedeliveryDelay
The maximum time in milliseconds between redelivery attempts. This is used if useExponentialBackOff is enabled. The default is 1000 (1 second). -1 means no limit.
jms.redeliveryPolicy.useExponentialBackOff
If enabled, increase redelivery delay with each subsequent attempt. It is disabled by default.
jms.redeliveryPolicy.backOffMultiplier
The multiplier for increasing the redelivery delay. The default is 5.
jms.redeliveryPolicy.useCollisionAvoidance
If enabled, adjust the redelivery delay slightly up or down to avoid collisions. It is disabled by default.
jms.redeliveryPolicy.collisionAvoidanceFactor
The multiplier for adjusting the redelivery delay. The default is 0.15.
nonBlockingRedelivery
If enabled, allow out of order redelivery, to avoid head-of-line blocking. It is disabled by default.

5.2. TCP options

closeAsync
If enabled, close the socket in a separate thread. It is enabled by default.
connectionTimeout
The timeout in milliseconds for TCP connect operations. The default is 30000 (30 seconds). 0 means no timeout.
dynamicManagement
If enabled, allow JMX management of the transport logger. It is disabled by default.
ioBufferSize
The I/O buffer size in bytes. The default is 8192 (8 KiB).
jmxPort
The port for JMX management. The default is 1099.
keepAlive
If enabled, use TCP keepalive. This is distinct from the keepalive mechanism based on KeepAliveInfo messages. It is disabled by default.
logWriterName
The name of the org.apache.activemq.transport.LogWriter implementation. Name-to-class mappings are stored in the resources/META-INF/services/org/apache/activemq/transport/logwriters directory. The default is default.
soLinger
The socket linger option. The default is 0.
soTimeout
The timeout in milliseconds for socket read operations. The default is 0, meaning no timeout.
soWriteTimeout
The timeout in milliseconds for socket write operations. The default is 0, meaning no timeout.
startLogging
If enabled, and the trace option is also enabled, log transport startup events. It is enabled by default.
tcpNoDelay
If enabled, do not delay and buffer TCP sends. It is disabled by default.
threadName
If set, the name assigned to the transport thread. The remote address is appended to the name. It is unset by default.
trace
If enabled, log transport events to log4j.logger.org.apache.activemq.transport.TransportLogger. It is disabled by default.
useInactivityMonitor
If enabled, time out connections that fail to send KeepAliveInfo messages. It is enabled by default.
useKeepAlive
If enabled, periodically send KeepAliveInfo messages to prevent the connection from timing out. It is enabled by default.
useLocalHost
If enabled, make local connections using the name localhost instead of the current hostname. It is disabled by default.

5.3. SSL/TLS options

socket.keyStore
The path to the SSL/TLS key store. A key store is required for mutual SSL/TLS authentication. If unset, the value of the javax.net.ssl.keyStore system property is used.
socket.keyStorePassword
The password for the SSL/TLS key store. If unset, the value of the javax.net.ssl.keyStorePassword system property is used.
socket.keyStoreType
The string name of the trust store type. The default is the value of java.security.KeyStore.getDefaultType().
socket.trustStore
The path to the SSL/TLS trust store. If unset, the value of the javax.net.ssl.trustStore system property is used.
socket.trustStorePassword
The password for the SSL/TLS trust store. If unset, the value of the javax.net.ssl.trustStorePassword system property is used.
socket.trustStoreType
The string name of the trust store type. The default is the value of java.security.KeyStore.getDefaultType().
socket.enabledCipherSuites
A comma-separated list of cipher suites to enable. If unset, the JVM default ciphers are used.
socket.enabledProtocols
A comma-separated list of SSL/TLS protocols to enable. If unset, the JVM default protocols are used.

5.4. OpenWire options

wireFormat.cacheEnabled
If enabled, avoid excessive marshalling and bandwidth consumption by caching frequently used values. It is enabled by default.
wireFormat.cacheSize
The number of cache entries. The cache is per connection. The default is 1024.
wireFormat.maxInactivityDuration
The maximum time in milliseconds before a connection with no activity is considered dead. The default is 30000 (30 seconds).
wireFormat.maxInactivityDurationInitalDelay
The initial delay in milliseconds before inactivity checking begins. Note that Inital is misspelled. The default is 10000 (10 seconds).
wireFormat.maxFrameSize
The maximum frame size in bytes. The default is the value of java.lang.Long.MAX_VALUE.
wireFormat.sizePrefixDisabled
If set true, do not prefix packets with their size. It is false by default.
wireFormat.stackTraceEnabled
If enabled, send stack traces from exceptions on the server to the client. It is enabled by default.
wireFormat.tcpNoDelayEnabled
If enabled, tell the server to activate TCP_NODELAY. It is enabled by default.
wireFormat.tightEncodingEnabled
If enabled, optimize for smaller encoding on the wire. This increases CPU usage. It is enabled by default.

5.5. Failover options

maxReconnectAttempts
The number of reconnect attempts allowed before reporting the connection as failed. The default is -1, meaning no limit. 0 disables reconnect.
maxReconnectDelay
The maximum time in milliseconds between the second and subsequent reconnect attempts. The default is 30000 (30 seconds).
randomize
If enabled, randomly select one of the failover endpoints. It is enabled by default.
reconnectDelayExponent
The multiplier for increasing the reconnect delay backoff. The default is 2.0.
useExponentialBackOff
If enabled, increase the reconnect delay with each subsequent attempt. It is enabled by default.
timeout
The timeout in milliseconds for send operations waiting for reconnect. The default is -1, meaning no timeout.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.