简体   繁体   English

无法停止ActiveMQ Producer?

[英]Unable to stop ActiveMQ Producer?

I am unable to stop ActiveMQ Producer. 我无法停止ActiveMQ Producer。

Scenario is: I have set low values for memory usage and temp storage. 方案是:我为内存使用量和临时存储设置了较低的值。

<systemUsage>
  <systemUsage>
    <memoryUsage>
      <memoryUsage limit="1 mb" />
    </memoryUsage>
    <storeUsage>
      <storeUsage limit="100 gb" />
    </storeUsage>
    <tempUsage>
      <tempUsage limit="50 mb" />
    </tempUsage>
  </systemUsage>
</systemUsage>

Producer flow control is set to false 生产者流控制设置为false

<destinationPolicy>
  <policyMap>
    <policyEntries>
      <policyEntry topic=">" producerFlowControl="false"/>
    </policyEntries>
    <policyEntries>
      <policyEntry queue=">" producerFlowControl="false"/>
    </policyEntries>
  </policyMap>
</destinationPolicy>

Now broker has blocked producer and am unable to stop producer, Why is this happening? 现在经纪人封锁了生产者,无法阻止生产者,为什么会这样?

Broker Logs say: 经纪人日志说:

Stopping producer (ID: Hidden ) to prevent flooding queue://test.queue.0. 停止生产者(ID: Hidden )以防止泛洪queue://test.queue.0。 See http://activemq.apache.org/producer-flow-control.html for more info (blocking for: 151s) 有关更多信息,请参见http://activemq.apache.org/producer-flow-control.html (阻止时间:151秒)

You have not disabled producerFlowControl for queues, only for topics. 您没有为队列仅对主题禁用producerFlowControl。

You would need to add something like this: 您将需要添加以下内容:

<policyEntry queue=">" producerFlowControl="false"/>

The link provided by the logs explains the behavior pretty much in detail. 日志提供的链接非常详细地解释了该行为。 Your producer is somehow flooding the broker and the broker responds by blocking for some time. 您的生产者以某种方式淹没了经纪人,而经纪人通过阻塞一段时间来做出响应。

go to bin folder path from terminal and run the following command: 从终端转到bin文件夹路径,然后运行以下命令:

./activemq stop ./activemq停止

Hope it helps. 希望能帮助到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM