1
votes

I am trying to read the topic messages enqueued in activemq in a non programatic fashion. ( for debugging purpose)

From the activemq admin webapp, I can post a topic, but I can read the message I posted ( which is not the case for queues).

I tried to use another jms client ( hermes), and I have the same issue : the topic message are not listed by the client.

As I am very new to AMQ, i am probably in total confusion... may somebody help?

Many thanks!

1
according to this it seems you can't browse topic messages from the ActiveMQ web console. But things should work using Hermes, I'll try to check it out after work. - Ahmad Y. Saleh

1 Answers

2
votes

ActiveMQ console can only publish messages to topics but cannot subscribe to them.

In Hermes this works, BUT NOTE that you need to start browsing a topic BEFORE the message is sent to the topic as Hermes receive messages sent to the topic AFTER it has subscribed. This is the normal way subscriptions work.

Well, the last things is actually not entirely true, as you can setup a durable subscriber by specifying the topic in Hermes to be durable as well as setting a clientId on the connection. You still need to register this consumer before any message is sent as you cannot "browse" through messages on a topic, just get messages for a specific subscriber.

Another way, for debugging, is editing the camel.xml file in Activemq and add a wiretap route:

<route>
  <from uri="activemq:topic:mytopic"/>
  <to uri="activemq:queue:myqueue"/>
</route>

Then you should have a copy of each published message on your "myqueue" queue, which you should be able to read in the console.