Im using Jboss AS 6 CR1 with hornetq as the messaging mech. In my application i have a queue which im dynamically adding consumers on with a specific message selector.
Problem is, when i restart the application (not the server, like when touching application.xml), then the subscribers a assigned the previous time remain assigned to that queue (why wont they close?), so the queue is delivering the messages randomly to all the subscribers.
My question is thus,
a. is there a way to clear all receivers from a queue?
b. is there a way to make sure that only one subscriber exists with a specific message selector?
c. will using a topic will help me acheive this (at lease a) - the reason im not using a topic is because sometime the consumer is being registered after some messages are sent to the queue, and those messages are being lost.
thanks for the help!
I'm not sure what kind of consumer you're doing? Durable subscribers?
there are management operations to remove them. You could probably use regular JMS for that.