Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-2011

duplicate message sends logged inconsistently - some times as warning, some other times as debug level.

XMLWordPrintable

    • Hide

      Run a default broker with this additional config:

      <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb" expireMessagesPeriod="5000">
      
      <timeStampingBrokerPlugin ttlCeiling="13" zeroExpirationOverride="13"/>
      

      The short expiration times are only used to reproduce the issue more quickly.
      It can also be reproduced using larger expiration times but less reliably.

      Then run these Broker Karaf commands:

      activemq:consumer --destination Consumer.A.VirtualTopic.Orders --messageCount 1
      
      activemq:consumer --destination Consumer.B.VirtualTopic.Orders --messageCount 1000 --sleep 10000
      
      activemq:producer --persistent true --messageCount 10000 --destination topic://VirtualTopic.Orders
      

      and watch the broker log file. The warning will appear many times.
      If in addition you configure:

      log4j.logger.org.apache.activemq.broker.region.RegionBroker=DEBUG
      log4j.logger.org.apache.activemq.broker.region.policy.AbstractDeadLetterStrategy=DEBUG
      

      you will also see the above DEBUG logging.

      Show
      Run a default broker with this additional config: <policyEntry queue= ">" producerFlowControl= " true " memoryLimit= "1mb" expireMessagesPeriod= "5000" > <timeStampingBrokerPlugin ttlCeiling= "13" zeroExpirationOverride= "13" /> The short expiration times are only used to reproduce the issue more quickly. It can also be reproduced using larger expiration times but less reliably. Then run these Broker Karaf commands: activemq:consumer --destination Consumer.A.VirtualTopic.Orders --messageCount 1 activemq:consumer --destination Consumer.B.VirtualTopic.Orders --messageCount 1000 --sleep 10000 activemq:producer --persistent true --messageCount 10000 --destination topic: //VirtualTopic.Orders and watch the broker log file. The warning will appear many times. If in addition you configure: log4j.logger.org.apache.activemq.broker.region.RegionBroker=DEBUG log4j.logger.org.apache.activemq.broker.region.policy.AbstractDeadLetterStrategy=DEBUG you will also see the above DEBUG logging.

      There is an inconsistency of the logging level at which duplicate messages are reported by the broker.
      The use case is a virtual topic with multiple queue subscribers and a message expiry set on each message.
      If the message expires on at least two queues *before* getting dispatched to a consumer it sometimes raises this as a warning

      12:36:04,794 | WARN  | r[amq] Scheduler | MessageDatabase  | 189 - 
      org.apache.activemq.activemq-osgi - 5.11.0.redhat-621117 | 
      Duplicate message add attempt rejected. Destination: QUEUE://ActiveMQ.DLQ, 
      Message id: ID:ce9f58739725-57928-1479472408621-21:1:1:1:6078
      

      and some times as a debug message

      14:47:54,332 | DEBUG | vice[amq] Task-4 | AbstractDeadLetterStrategy       | 189 - 
      org.apache.activemq.activemq-osgi - 5.11.0.redhat-621117 | 
      Not adding duplicate to DLQ: ID:66b6b257b61e-45558-1478789174147-11:1:1:1:2, 
      dest: topic://VirtualTopic.Orders
      

      This logging should be consistent and happen at the same logging level.

            gtully@redhat.com Gary Tully
            rhn-support-tmielke Torsten Mielke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: