ActiveMQ Artemis запланированные сообщения застряли - PullRequest
3 голосов
/ 01 апреля 2020

У меня есть сообщения, которые не доставляются, и я надеюсь, что кто-то сможет предоставить какую-то информацию.

Только иногда я оказываюсь в следующем состоянии на моем брокере - наблюдается через консоль управления на некоторых Speci c очередь:

  • countMessages () -> 17
  • browse () -> пустой список
  • listScheduledMessages () -> показывает 17 сообщений
  • retryMessage ("с некоторым идентификатором сообщения") -> тогда количество запланированных событий уменьшается до 16

Мое приложение не отправляет никаких запланированных сообщений. JMSXDeliveryCount для этих запланированных сообщений всегда равно 0, поэтому кажется, что они не находятся в процессе их доставки из-за некоторого исключения у потребителя.

посредник. xml:

<configuration xmlns="urn:activemq" xmlns:xi="http://www.w3.org/2001/XInclude"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
  <core xmlns="urn:activemq:core" xsi:schemaLocation="urn:activemq:core ">
    <name>xxx-artemis-activemq-artemis-master-0</name>
      <persistence-enabled>true</persistence-enabled>
      <journal-type>ASYNCIO</journal-type>
      <paging-directory>data/paging</paging-directory>
      <bindings-directory>data/bindings</bindings-directory>
      <journal-directory>data/journal</journal-directory>
      <large-messages-directory>data/large-messages</large-messages-directory>
      <journal-datasync>true</journal-datasync>
      <journal-min-files>2</journal-min-files>
      <journal-pool-files>10</journal-pool-files>
      <journal-device-block-size>4096</journal-device-block-size>
      <journal-file-size>10M</journal-file-size>
      <journal-buffer-timeout>12000</journal-buffer-timeout>
      <journal-max-io>4096</journal-max-io>
      <disk-scan-period>5000</disk-scan-period>
      <max-disk-usage>90</max-disk-usage>
      <acceptors>
      <acceptor name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpDuplicateDetection=true</acceptor>
      <acceptor name="amqp">tcp://0.0.0.0:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpDuplicateDetection=true</acceptor>
      <acceptor name="stomp">tcp://0.0.0.0:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true</acceptor>
      <acceptor name="hornetq">tcp://0.0.0.0:5445?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;protocols=HORNETQ,STOMP;useEpoll=true</acceptor>
      <acceptor name="mqtt">tcp://0.0.0.0:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true</acceptor>
    </acceptors><security-settings>
      <security-setting match="#">
        <permission type="createNonDurableQueue" roles="amq"/>
        <permission type="deleteNonDurableQueue" roles="amq"/>
        <permission type="createDurableQueue" roles="amq"/>
        <permission type="deleteDurableQueue" roles="amq"/>
        <permission type="createAddress" roles="amq"/>
        <permission type="deleteAddress" roles="amq"/>
        <permission type="consume" roles="amq"/>
        <permission type="browse" roles="amq"/>
        <permission type="send" roles="amq"/>
          <permission type="manage" roles="amq"/>
      </security-setting>
    </security-settings>
      <cluster-user>exampleUser</cluster-user>
      <cluster-password>secret</cluster-password>
      <address-settings>
      <address-setting match="activemq.management#">
        <dead-letter-address>DLQ</dead-letter-address>
        <expiry-address>ExpiryQueue</expiry-address>
        <redelivery-delay>0</redelivery-delay>
          <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>
      <address-setting match="#">
        <dead-letter-address>DLQ</dead-letter-address>
        <expiry-address>ExpiryQueue</expiry-address>
          <redelivery-delay>1000</redelivery-delay>
        <redelivery-delay-multiplier>5</redelivery-delay-multiplier>
        <max-redelivery-delay>360000001</max-redelivery-delay>
        <redelivery-collision-avoidance-factor>0.15</redelivery-collision-avoidance-factor>
          <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>
    </address-settings><addresses>
      <address name="DLQ">
        <anycast>
          <queue name="DLQ"/>
        </anycast>
      </address>
      <address name="ExpiryQueue">
        <anycast>
          <queue name="ExpiryQueue"/>
        </anycast>
      </address>
    </addresses><connectors>
      <connector name="xxx-artemis-activemq-artemis-master-0">tcp://xxx-artemis-activemq-artemis-master-0.xxx-artemis-activemq-artemis-master.artemis.svc.cluster.local:61616</connector>
      <connector name="xxx-artemis-activemq-artemis-slave-0">tcp://xxx-artemis-activemq-artemis-slave-0.xxx-artemis-activemq-artemis-slave.artemis.svc.cluster.local:61616</connector>
    </connectors><cluster-connections>
      <cluster-connection name="xxx-artemis-activemq-artemis">
        <address/>
        <connector-ref>xxx-artemis-activemq-artemis-master-0</connector-ref>
        <retry-interval>500</retry-interval>
        <retry-interval-multiplier>1.1</retry-interval-multiplier>
        <max-retry-interval>5000</max-retry-interval>
        <initial-connect-attempts>-1</initial-connect-attempts>
        <reconnect-attempts>-1</reconnect-attempts>
        <message-load-balancing>ON_DEMAND</message-load-balancing>
        <max-hops>1</max-hops>
        <static-connectors>
          <connector-ref>xxx-artemis-activemq-artemis-master-0</connector-ref>
          <connector-ref>xxx-artemis-activemq-artemis-slave-0</connector-ref>
        </static-connectors>
      </cluster-connection>
    </cluster-connections><ha-policy>
      <replication>
        <master>
          <group-name>xxx-artemis-activemq-artemis-0</group-name>
            <check-for-live-server>false</check-for-live-server>
        </master>
      </replication>
    </ha-policy>
  </core><core xmlns="urn:activemq:core">
    <jmx-management-enabled>true</jmx-management-enabled>
  </core>
</configuration>
´´´
...