请通过浏览器功能收藏网页

activemq 服务链接URI配置: activemq

发布时间:2020-01-08 11:38:08  作者:本站编辑  来源:本站原创  浏览次数:
www.javainfo.com.cn 上干货 欢迎收藏

ActiveMQ支持通过Configuration URI明确的配置连接属性。

例如:当要设置异步发送时,可以通过在Configuration URI中使用jms.$PROPERTY来设置。

tcp://localhost:61616?jms.useAsyncSend=true

以下的选项在URI必须以“jms.”为前缀。

属性

默认值

描述

alwaysSessionAsync

true

If this flag is set then a seperate thread is not used for dispatching messages for each Session in the Connection. However, a separate thread is always used if there is more than one session, or the session isn't in auto acknowledge or dups ok mode

clientID

null

Sets the JMS clientID to use for the connection

closeTimeout

15000 (milliseconds)

Sets the timeout before a close is considered complete. Normally a close() on a connection waits for confirmation from the broker; this allows that operation to timeout to save the client hanging if there is no broker.

copyMessageOnSend

true

Should a JMS message be copied to a new JMS Message object as part of the send() method in JMS. This is enabled by default to be compliant with the JMS specification. You can disable it if you do not mutate JMS messages after they are sent for a performance boost.

disableTimeStampsByDefault

false

Sets whether or not timestamps on messages should be disabled or not. If you disable them it adds a small performance boost.

dispatchAsync

false

Should the broker dispatch messages asynchronously to the consumer.

nestedMapAndListEnabled

true

Enables/disables whether or not Structured Message Properties and MapMessagesare supported so that Message properties and MapMessage entries can contain nested Map and List objects. Available since version 4.1 onwards

objectMessageSerializationDefered

false

When an object is set on an ObjectMessage, the JMS spec requires the object to be serialized by that set method. Enabling this flag causes the object to not get serialized. The object may subsequently get serialized if the message needs to be sent over a socket or stored to disk.

optimizeAcknowledge

false

Enables an optimised acknowledgement mode where messages are acknowledged in batches rather than individually. Alternatively, you could use Session.DUPS_OK_ACKNOWLEDGE acknowledgement mode for the consumers which can often be faster. WARNINGenabling this issue could cause some issues with auto-acknowledgement on reconnection

optimizedMessageDispatch

true

If this flag is set then an larger prefetch limit is used - only applicable for durable topic subscribers 

useAsyncSend

false

Forces the use of Async Sends which adds a massive performance boost; but means that the send() method will return immediately whether the message has been sent or not which could lead to message loss.

useCompression

false

Enables the use of compression of the message bodies

useRetroactiveConsumer

false

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.



如有疑问 请留言 欢迎提供建议

评论已有 0