Artemis 中 ActiveMQ 5.x sendFailIfNoSpace 设置的等效项是什么?
What is the equivalent for the ActiveMQ 5.x sendFailIfNoSpace setting in Artemis?
我正在使用 Spring 启动应用程序,它使用 Spring 的 JmsTemplate
将消息发送到 ActiveMQ Artemis 队列。如果磁盘 space 已满并且队列正在阻塞,那么对 convertAndSend
的任何 JmsTemplate
调用都将永远挂起。还是给我报错比较好
ActiveMQ 对此有一个配置,即 sendFailIfNoSpace
:
<systemUsage>
<systemUsage sendFailIfNoSpace="true">
<memoryUsage>
<memoryUsage limit="20 mb"/>
</memoryUsage>
</systemUsage>
</systemUsage>
有没有办法配置 Artemis 队列来执行此操作?
申请中的一些细节是:
A Spring 自动配置 JmsTemplate
调用:
jmsTemplate.convertAndSend("just another message");
Artemis 代理对所涉及的任何队列都有默认设置:
<address-setting match="#">
<dead-letter-address>DLQ</dead-letter-address>
<expiry-address>ExpiryQueue</expiry-address>
<redelivery-delay>0</redelivery-delay>
<!-- with -1 only the global-max-size is in use for limiting -->
<max-size-bytes>-1</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>PAGE</address-full-policy>
<auto-create-queues>true</auto-create-queues>
<auto-create-addresses>true</auto-create-addresses>
<auto-create-jms-queues>true</auto-create-jms-queues>
<auto-create-jms-topics>true</auto-create-jms-topics>
</address-setting>
目前在 ActiveMQ Artemis 中没有 sendFailIfNoSpace
的等价物。如 the documentation 中所述,当超过 max-disk-usage
时,代理将阻塞:
The System will perform scans on the disk to determine if the disk is beyond a configured limit. These are configured through max-disk-usage
in percentage. Once that limit is reached any message will be blocked. (unless the protocol doesn't support flow control on which case there will be an exception thrown and the connection for those clients dropped).
需要说明的是,客户端调用不会永远被阻止。它们将被阻塞,直到磁盘上有足够的 space 被释放。
我正在使用 Spring 启动应用程序,它使用 Spring 的 JmsTemplate
将消息发送到 ActiveMQ Artemis 队列。如果磁盘 space 已满并且队列正在阻塞,那么对 convertAndSend
的任何 JmsTemplate
调用都将永远挂起。还是给我报错比较好
ActiveMQ 对此有一个配置,即 sendFailIfNoSpace
:
<systemUsage>
<systemUsage sendFailIfNoSpace="true">
<memoryUsage>
<memoryUsage limit="20 mb"/>
</memoryUsage>
</systemUsage>
</systemUsage>
有没有办法配置 Artemis 队列来执行此操作?
申请中的一些细节是:
A Spring 自动配置 JmsTemplate
调用:
jmsTemplate.convertAndSend("just another message");
Artemis 代理对所涉及的任何队列都有默认设置:
<address-setting match="#">
<dead-letter-address>DLQ</dead-letter-address>
<expiry-address>ExpiryQueue</expiry-address>
<redelivery-delay>0</redelivery-delay>
<!-- with -1 only the global-max-size is in use for limiting -->
<max-size-bytes>-1</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>PAGE</address-full-policy>
<auto-create-queues>true</auto-create-queues>
<auto-create-addresses>true</auto-create-addresses>
<auto-create-jms-queues>true</auto-create-jms-queues>
<auto-create-jms-topics>true</auto-create-jms-topics>
</address-setting>
目前在 ActiveMQ Artemis 中没有 sendFailIfNoSpace
的等价物。如 the documentation 中所述,当超过 max-disk-usage
时,代理将阻塞:
The System will perform scans on the disk to determine if the disk is beyond a configured limit. These are configured through
max-disk-usage
in percentage. Once that limit is reached any message will be blocked. (unless the protocol doesn't support flow control on which case there will be an exception thrown and the connection for those clients dropped).
需要说明的是,客户端调用不会永远被阻止。它们将被阻塞,直到磁盘上有足够的 space 被释放。