Chapter 5. Configuration options
This chapter lists the available configuration options for AMQ Core Protocol JMS.
JMS configuration options are set as query parameters on the connection URI. For more information, see Section 4.3, “Connection URIs”.
5.1. General options
- user
- The user name the client uses to authenticate the connection.
- password
- The password the client uses to authenticate the connection.
- clientID
- The client ID that the client applies to the connection.
- groupID
- The group ID that the client applies to all produced messages.
- autoGroup
- If enabled, generate a random group ID and apply it to all produced messages.
- preAcknowledge
- If enabled, acknowledge messages as soon as they are sent and before delivery is complete. This provides "at most once" delivery. It is disabled by default.
- blockOnDurableSend
- If enabled, when sending non-transacted durable messages, block until the remote peer acknowledges receipt. It is enabled by default.
- blockOnNonDurableSend
- If enabled, when sending non-transacted non-durable messages, block until the remote peer acknowledges receipt. It is disabled by default.
- blockOnAcknowledge
- If enabled, when acknowledging non-transacted received messages, block until the remote peer confirms acknowledgment. It is disabled by default.
- callTimeout
- The time in milliseconds to wait for a blocking call to complete. The default is 30000 (30 seconds).
- callFailoverTimeout
- When the client is in the process of failing over, the time in millisconds to wait before starting a blocking call. The default is 30000 (30 seconds).
- ackBatchSize
- The number of bytes a client can receive and acknowledge before the acknowledgement is sent to the broker. The default is 1048576 (1 MiB).
- dupsOKBatchSize
-
When using the
DUPS_OK_ACKNOWLEDGE
acknowledgment mode, the size in bytes of acknowledgment batches. The default is 1048576 (1 MiB). - transactionBatchSize
- When receiving messsages in a transaction, the size in bytes of acknowledgment batches. The default is 1048576 (1 MiB).
- cacheDestinations
- If enabled, cache destination lookups. It is disabled by default.
5.2. TCP options
- tcpNoDelay
- If enabled, do not delay and buffer TCP sends. It is enabled by default.
- tcpSendBufferSize
- The send buffer size in bytes. The default is 32768 (32 KiB).
- tcpReceiveBufferSize
- The receive buffer size in bytes. The default is 32768 (32 KiB).
- writeBufferLowWaterMark
- The limit in bytes below which the write buffer becomes writable. The default is 32768 (32 KiB).
- writeBufferHighWaterMark
- The limit in bytes above which the write buffer becomes non-writable. The default is 131072 (128 KiB).
5.3. SSL/TLS options
- sslEnabled
- If enabled, use SSL/TLS to authenticate and encrypt connections. It is disabled by default.
- keyStorePath
-
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. - keyStorePassword
-
The password for the SSL/TLS key store. If unset, the value of the
javax.net.ssl.keyStorePassword
system property is used. - trustStorePath
-
The path to the SSL/TLS trust store. If unset, the value of the
javax.net.ssl.trustStore
system property is used. - trustStorePassword
-
The password for the SSL/TLS trust store. If unset, the value of the
javax.net.ssl.trustStorePassword
system property is used. - trustAll
- If enabled, trust the provided server certificate implicitly, regardless of any configured trust store. It is disabled by default.
- verifyHost
- If enabled, verify that the connection hostname matches the provided server certificate. It is disabled by default.
- enabledCipherSuites
- A comma-separated list of cipher suites to enable. If unset, the JVM default ciphers are used.
- enabledProtocols
- A comma-separated list of SSL/TLS protocols to enable. If unset, the JVM default protocols are used.
5.4. Failover options
- initialConnectAttempts
- The number of reconnect attempts allowed before the first successful connection and before the client discovers the broker topology. The default is 0, meaning only one attempt is allowed.
- failoverOnInitialConnection
- If enabled, attempt to connect to the backup server if the initial connection fails. It is disabled by default.
- reconnnectAttempts
- The number of reconnect attempts allowed before reporting the connection as failed. The default is -1, meaning no limit.
- retryInterval
- The time in milliseconds between reconnect attempts. The default is 2000 (2 seconds).
- retryIntervalMultiplier
- The multiplier used to grow the retry interval. The default is 1.0, meaning equal intervals.
- maxRetryInterval
- The maximum time in milliseconds between reconnect attempts. The default is 2000 (2 seconds).
- ha
- If enabled, track changes in the topology of HA brokers. The host and port from the URI is used only for the initial connection. After initial connection, the client receives the current failover endpoints and any updates resulting from topology changes. It is disabled by default.
- connectionTTL
- The time in milliseconds after which the connection is failed if the server sends no ping packets. The default is 60000 (1 minute). -1 disables the timeout.
- confirmationWindowSize
- The size in bytes of the command replay buffer. This is used for automatic session re-attachment on reconnect. The default is -1, meaning no automatic re-attachment.
- clientFailureCheckPeriod
- The time in milliseconds between checks for dead connections. The default is 30000 (30 seconds). -1 disables checking.
5.5. Flow control options
- consumerWindowSize
- The size in bytes of the per-consumer message prefetch buffer. The default is 1048576 (1 MiB). -1 means no limit. 0 disables prefetching.
- consumerMaxRate
- The maximum number of messages to consume per second. The default is -1, meaning no limit.
- producerWindowSize
- The requested size in bytes for credit to produce more messages. This limits the total amount of data in flight at one time. The default is 1048576 (1 MiB). -1 means no limit.
- producerMaxRate
- The maximum number of messages to produce per second. The default is -1, meaning no limit.
5.6. Load balancing options
- useTopologyForLoadBalancing
- If enabled, use the cluster topology for connection load balancing. It is enabled by default.
- connectionLoadBalancingPolicyClassName
-
The class name of the connection load balancing policy. The default is
org.apache.activemq.artemis.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy
.
5.7. Large message options
The client can enable large message support by setting a value for the property minLargeMessageSize
. Any message larger than minLargeMessageSize
is considered a large message.
- minLargeMessageSize
- The minimum size in bytes at which a message is treated as a large message. The default is 102400 (100 KiB).
- compressLargeMessages
If enabled, compress large messages, as defined by
minLargeMessageSize
. It is disabled by default.NoteIf the compressed size of a large message is less than the value of
minLargeMessageSize
, the message is sent as a regular message. Therefore, it is not written to the broker’s large-message data directory.
5.8. Threading options
- useGlobalPools
-
If enabled, use one pool of threads for all
ConnectionFactory
instances. Otherwise, use a separate pool for each instance. It is enabled by default. - threadPoolMaxSize
- The maximum number of threads in the general thread pool. The default is -1, meaning no limit.
- scheduledThreadPoolMaxSize
- The maximum number of threads in the thread pool for scheduled operations. The default is 5.