activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeroen van Bergen <>
Subject Consumer not consuming messages
Date Mon, 11 Feb 2008 13:58:33 GMT

I'm running a very basic instance of AMQ 5.0.0: just the supplied sample
configuration, starting the broker with bin\activemq. My client application
(Java SE) produces and consumes messages on a single queue. Both the
producer and the consumer use the
session.createXXX(session.createQueue(queueName), null) call to create a
producer and a consumer, respectively.

The producer is happily producing messages. I can browse them using the web
front end supplied with ActiveMQ. When I add a QueueBrowser to the consuming
class it can see the messages in the queue. The consumer is not picking up
any message at all. Relevant code:

QueueBrowser browser =
Enumeration enumeration = browser.getEnumeration();
while (enumeration.hasMoreElements()) {
    Message message = (Message) enumeration.nextElement();
    logger.debug("Saw message " + message.getJMSMessageID());
logger.debug(getName() +  " is requesting messages from " + queueName);
Message message = consumer.receiveNoWait();
if (message != null) {
    logger.debug("Retrieved message " + message.getJMSMessageID());

The consumer is started before the producer and they run in seperate threads
on a 1.6.0_03 Sun JVM on Windows XP Pro SP2.

What might be causing this behaviour? Do I have to supply credentials before
a consumer is allowed to actually consume messages? 

Thanks in advance for any response.
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message