LOL! I had just finished writing a test that uses a QueueBrowser and had the same problem, so based on the prior issue I posted I put in a start() connection and it worked.
On Feb 11, 2008 9:12 AM, James Strachan <[EMAIL PROTECTED]> wrote: > On 11/02/2008, Jeroen van Bergen <[EMAIL PROTECTED]> wrote: > > > > 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 = > > session.createBrowser(session.createQueue(queueName)); > > 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. > > Have you hit this FAQ entry? > > http://activemq.apache.org/i-am-not-receiving-any-messages-what-is-wrong.html > > -- > James > ------- > http://macstrac.blogspot.com/ > > Open Source Integration > http://open.iona.com >