【问题标题】:ActiveMQ 5.15.9 - limiting storage to 100 GB when producerFlowControl is false and Systemusage is not setActiveMQ 5.15.9 - 当 producerFlowControl 为 false 且未设置 Systemusage 时将存储限制为 100 GB
【发布时间】:2021-11-22 02:26:32
【问题描述】:

我在 Camel 2.25.0 中嵌入的 ActiveMQ 5.19.x 遇到了一个奇怪的问题。它无缘无故地将存储空间限制为 100 GB。未设置系统使用。以前我们在那里有限制,但后来我删除了。

我检查了,磁盘空间可用。

ActiveMQ VMTransport: vm://oooo-broker#809-1 |  |  | o.a.activemq.broker.region.Queue | Usage(Main:store:queue://.....:store) percentUsage=99%, usage=107374272210, limit=107374182400, percentUsageMinDelta=1%;Parent:Usage(Main:store) percentUsage=100%, usage=107374272210, limit=107374182400, percentUsageMinDelta=1%: Persistent store is Full, 100% of 107374182400. Stopping producer (ID:int1.prima.pricefx.net-33479-1632477163918-10:27:5:1) to prevent flooding queue://oooo. See http://activemq.apache.org/producer-flow-control.html for more info (blocking for: 9s)

我的配置如下:

<amq:broker id="broker" brokerName="im-oooo-broker" useShutdownHook="false" useJmx="true"
              persistent="true" dataDirectory="${data.directory}/activemq-data"
              xmlns:amq="http://activemq.apache.org/schema/core">
    <amq:transportConnectors>
      <!-- vm transport for intra-jvm communication -->
      <amq:transportConnector name="vm" uri="vm://oooo-broker"/>
    </amq:transportConnectors>
    <!-- queues -->
    <amq:destinations>
      <amq:queue physicalName="......"/>
      <amq:queue physicalName="......"/>
      <amq:queue physicalName="......"/>
      <amq:queue physicalName="......"/>
      <amq:queue physicalName="......"/>
      <amq:queue physicalName="......"/>
      <amq:queue physicalName="......"/>
    </amq:destinations>
    <amq:destinationPolicy>
      <amq:policyMap>
        <amq:policyEntries>
          <amq:policyEntry queue="......" producerFlowControl="false"/>
          <amq:policyEntry queue="......" producerFlowControl="false"/>
          <amq:policyEntry queue="......" producerFlowControl="false"/>
          <amq:policyEntry queue="......" producerFlowControl="false"/>
          <amq:policyEntry queue="......" producerFlowControl="false"/>
          <amq:policyEntry queue="......" producerFlowControl="false"/>
          <amq:policyEntry queue="......" producerFlowControl="false"/>
        </amq:policyEntries>
      </amq:policyMap>
    </amq:destinationPolicy>
<!--    <amq:systemUsage>-->
<!--      <amq:systemUsage>-->
<!--        <amq:memoryUsage>-->
<!--          <amq:memoryUsage limit="${.......limit}"/>-->
<!--        </amq:memoryUsage>-->
<!--        <amq:storeUsage>-->
<!--          <amq:storeUsage limit="${.......limit}"/>-->
<!--        </amq:storeUsage>-->
<!--        <amq:tempUsage>-->
<!--          <amq:tempUsage limit="${.......limit}"/>-->
<!--        </amq:tempUsage>-->
<!--      </amq:systemUsage>-->
<!--    </amq:systemUsage>-->
  </amq:broker>
  <!--   create a Camel ActiveMQ component to use, using the Spring bean style -->
  <!--   we use the vm protocol to communicate intra-jvm which is much faster than tcp -->
  <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
    <!-- vm://myBroker is the vm protocol, and myBroker is the broker name -->
    <property name="brokerURL" value="vm://......-broker?broker.persistent=true"/>
  </bean>

【问题讨论】:

    标签: activemq


    【解决方案1】:

    如果您不指定,ActiveMQ 将使用默认值。对于存储使用,该值为 100GB。

    ActiveMQ 需要设置系统使用值。管理计算机资源(内存、磁盘等)以保持消息传递的服务质量是代理的核心工作。

    未来读者注意事项:Radovan (OP) 提到了 ActiveMQ 5.19.x。目前该版本不存在,所以使用的版本未知。

    【讨论】:

    • 感谢您的解释。 ActiveMQ 5.19.5 的版本捆绑在 Camel 2.25.0 中。你知道我在哪里可以找到提到的默认值吗?
    • 抱歉ActiveMQ的版本确实是5.15.9。
    • 我在源码中发现了如下默认配置。我不确定它什么时候使用。 &lt;systemUsage&gt; &lt;systemUsage&gt; &lt;memoryUsage&gt; &lt;memoryUsage percentOfJvmHeap="70" /&gt; &lt;/memoryUsage&gt; &lt;storeUsage&gt; &lt;storeUsage limit="100 gb"/&gt; &lt;/storeUsage&gt; &lt;tempUsage&gt; &lt;tempUsage limit="50 gb"/&gt; &lt;/tempUsage&gt; &lt;/systemUsage&gt; &lt;/systemUsage&gt;
    猜你喜欢
    • 2011-11-30
    • 2012-09-12
    • 2013-11-12
    • 2020-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多