Sorry, its been a while since I've had to write a client by hand, but do you need to call amqConnection.start() to begin receiving messages?
Tim astepanenko wrote: > > Dear all, > > I'm new to ActiveMQ and have run into a problem when EnqueueCount and > DispatchCount for my queue in JConsole are increased accordingly with > every new message, but the DequeueCount is still 0, and my onMessage() > handlers are never called. I use ActiveMQ-4.2-incubator-SNAPSHOT. JConsole > also reports the correct number of consumers for the queue. What am I > missing here? Why messages are not delivered to my consumers? If they are > dispatched then to what destination? > > The following piece of code creates a queue and registers a consumer to > it: > ## > ActiveMQConnectionFactory connFactory = > new ActiveMQConnectionFactory(this.adminAccessUsername, > this.adminAccessPassword, this.tcpUrl); > Connection amqConnection = connFactory.createConnection(); > Session amqSession = amqConnection.createSession(false, > Session.CLIENT_ACKNOWLEDGE); > Queue controlQueue = amqSession.createQueue(exaControlQueue); > consumer = amqSession.createConsumer(controlQueue); > consumer.setMessageListener(new ControlListener()); > ## > ControlListener implements MessageListener interface, but it's onMessage() > method is never called. > > Thank you in advance, > Andrew Stepanenko > -- View this message in context: http://www.nabble.com/DequeueCount-is-0-even-with-active-consumers-tf3535958s2354.html#a9872479 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
