Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-4983

Duplicate messages generated by JMX replay operation when AMQP broker-connection mirroring is enabled and when the queue is paging

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.36.0
    • None
    • AMQP, JMX, management
    • None

    Description

      Context:
      Messages are duplicated by the replay capability that recovers messages from retention folder.
      It happens when the broker is configured with an AMQP broker connection, mirroring is enabled and the queue is paging.

      Investigation notes:
      It appears that several copy of the message exist in retention folder. The original message is present as expected but an additional occurence with mirroring property "x-opt-amq-mr-id" is also found. 
      The ReplayManager while scanning messages in journals of the retention folder, processes entries one by one, and recover messages regardless of whether they are duplicates originating from mirroring.

      Disabling the AMQP broker connection (and mirroring) in configuration restore the normal behaviour of the JMX replay operation.

      Test case:
      The test case "ReplayWithBrokerConnectionTest" is provided, just add it under:

      tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/retention

      When running the test, "testReplayCorePaging" will fail.

      Attachments

        1. ReplayWithBrokerConnectionTest.java
          5 kB
          Jean-Pascal Briquet

        Activity

          People

            Unassigned Unassigned
            jpbriquet Jean-Pascal Briquet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: