activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Joschko <>
Subject Messages send via JMX are deliverd, but the other ones not...
Date Tue, 29 Aug 2006 16:20:29 GMT

I think I made a stupid mistake but I can't find it. I simply try to send
and receive a message from a topic. The problem is that if I try to send a
message from the code, it is never delivered to the clients (which are using
MessageAvailableListeners and operate on one connection). However I can see
in the JMX console, that there are two subscriptions on the topic "test".
Furthermore I see the attribute enqueuecount on the test topic increasing
when I send a message from the java code. On the Operations tab of the test
topic I can press the browseAsTable button I can see a number of JMS
messages which match the one I sent (at least the priority and the
timestamp). However fields like JMSType and properties are empty???

Doing a further test in the JMX console by sending a textmessage from it
triggers the clients. The messages are received correctly.
Hm, I have no clue what's going wrong. The code that sends the message:

            Destination destination = session.createTopic(channel);
            TextMessage message = this.session.createTextMessage(text);
            MessageProducer producer = this.session.createProducer(null);
            producer.send(destination, message);

I wonder if it is correct to create the topic again to send a message.
However if I store the destination and reuse it, it doesn't work either.

Another thing that I can see in the JMX console and that makes me wonder is
that there are multiple topics:


as soon as I send a message via the JMX console a further topic is created


This does not happen if I try to send the message from the java code. Seems
that I don't understand how to correctly create a topic for a
messageproducer .....

Thanks for reading, 

View this message in context:
Sent from the ActiveMQ - User forum at

View raw message