Connection Configuration URI
An Apache ActiveMQ connection can be configured by explicitly setting properties on the ActiveMQConnection or ActiveMQConnectionFactory objects themselves via the bean properties or using the following URI syntax.
Use the Correct Prefix!
The following options should be prefixed with
jms. when used on a
brokerURL or a broker's transport connector.
A separate thread is always used when there's more than one session, or the session isn't in
The size of the message window that will be audited for duplicates and out of order messages.
Maximum number of producers that will be audited.
Sets the JMS clientID to use for the connection.
Sets the timeout, in milliseconds, before a close is considered complete. Normally a
This allows the close operation to timeout preventing the client from hanging when no broker is available.
Controls whether message expiration checking is done in each
Should a JMS message be copied to a new JMS Message object as part of the
For a performance boost set to
Sets whether or not timestamps on messages should be disabled or not.
For a small performance boost set to
Should the broker dispatch messages asynchronously to the consumer?
Controls whether Structured Message Properties and MapMessages are supported so that Message properties and
When an object is set on an
Enables an optimized acknowledgement mode where messages are acknowledged in batches rather than individually. Alternatively, you could use
WARNING: enabling this issue could cause some issues with auto-acknowledgement on reconnection.
If > 0, specifies the max time, in milliseconds, between batch acknowledgements when
If > 0, specifies a time interval upon which all the outstanding ACKs are delivered when optimized acknowledge is used so that a long running consumer that doesn't receive any more messages will eventually ACK the last few un-ACK'ed messages (since 5.7).
Forces the use of Async Sends which adds a massive performance boost; but means that the
Enables the use of compression on the message's body.
Sets whether or not retroactive consumers are enabled. Retroactive consumers allow non-durable topic subscribers to receive old messages that were published before the non-durable subscriber started.
The timeout, in milliseconds, from the time of connection creation to when a warning is generated if the connection is not properly started via Connection.start() and a message is received by a consumer. It is a very common gotcha to forget to start the connection and then wonder why no messages are delivered so this option makes the default case to create a warning if the user forgets.
To disable the warning just set the value to
You can also configure nested objects on the connection object using the given prefixes. See the javadoc for a breakdown of each individual property.
For example you could set