You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by afhall <an...@usamp.com> on 2013/02/05 18:45:16 UTC

Some messages are undelivered in a queue using Message Groups

I am experiencing an issue where a small percentage of messages seem to get
stuck in the message queue, and don't ever get processed.  When looking at
the queue of messages (in the admin web console), the "Redelivered" column
says "false" for these messages.

I'm not sure how to debug why these messages aren't getting consumed.

I'm using the following setup:

 - Apache ActiveMQ 5.5.1
 - Camel / Spring / Java is used for message consuming
 - Using "Message Groups" to ensure message ordering based on username

**The consumer is setup as follows:**

    @Consume(uri =
"activemq:queue:message.event.service?concurrentConsumers=3")
        public void consume(Event event) {
          // ... processing of event code here ... //
        }
    }

**The producer is setup as follows:**

    import org.apache.camel.EndpointInject;
    import org.apache.camel.ProducerTemplate;

    // ... //

    @EndpointInject(uri =
"activemq:queue:message.event.service?concurrentConsumers=3")
    private ProducerTemplate sender;

    @Override
    public void emit(final Event e) {
        // Set message group based on username
    
sender.sendBodyAndHeader(e, "JMSXGroupID", e.getUser().getUsername());
    }

The stalled out messages seem to correspond to when the consumer queue is
somewhat slow, but not extremely slow.  By slow, I mean taking 2 seconds
instead of 1 second, so I doubt this is really an issue.

Does anyone have any ideas why this might occur, and how to better diagnose?

Thanks!



--
View this message in context: http://activemq.2283324.n4.nabble.com/Some-messages-are-undelivered-in-a-queue-using-Message-Groups-tp4662793.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.