-
1. Re: JMS Topic usage based on HornetQ JMS API
gaohoward Jul 6, 2014 9:55 PM (in response to yairogen)HornetQ automatically prefixes "jms.topic" to Topic names. I think you can try:
session..createProducer(new HornetQTopic("myFirstTopic"));
and see if it workds
-
2. Re: JMS Topic usage based on HornetQ JMS API
yairogen Jul 7, 2014 4:12 AM (in response to gaohoward)Thanks. The producer works but looks like the consumer is not. In Jconsole I see the messages but they are not consumed.
This is the consumer code:
TopicSubscriber durableSubscriber = HornetQJMSMessagingFactory.getSession().createDurableSubscriber(HornetQTopic.createTopic("myFirstTopic"), "consumer1");
durableSubscriber.setMessageListener(myListener);
Looks like my consumer is broken. It prints only the first I sent. messageCounter keeps going up as if the messages are not acknowladged and I can't read any more messages. If I send more I see messages added and messages count go up and the running consumer doesn't get anything.
Any ideas?
-
3. Re: JMS Topic usage based on HornetQ JMS API
gaohoward Jul 7, 2014 5:03 AM (in response to yairogen)Not sure what's happened. Can you post a simple test?
-
4. Re: JMS Topic usage based on HornetQ JMS API
yairogen Jul 7, 2014 7:14 AM (in response to gaohoward)My bad. I mistakenly mixed non JMS hornetq session with JMS session.
works fine now.