ActiveMQ 5.15.9 - 在 producerFlowControl 为 false 且未设置 Systemusage 时将存储限制为 100 GB

ActiveMQ 5.15.9 - limiting storage to 100 GB when producerFlowControl is false and Systemusage is not set

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

我检查过磁盘 space 可用。

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 将使用默认值。对于商店使用,该值为 100GB。

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

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