I would like to as a follow on question relating to durable subscriptions. If a durable
subscription is created:
MessageConsumer consumer = session.createDurableSubscriber(Topic topic, String name);
The whole point of using durable subscribers is so that messages can be received while the
consumer is not connected. Let us say the consumer above is created in a method and the
reference ceases to exist after. The consumer can still be notified of any messages
published to its topic. However, how can that consumer be closed and unsubscribed? If
you attempt to unsubscribe the durable subscriber:
session.unsubscribe(String name);
an IllegalStateException will be thrown per the JMS 1.1 spec:
"It is erroneous for a client to delete a durable subscription while there is an
active MessageConsumer or TopicSubscriber for the subscription, or while a consumed
message is part of a pending transaction or has not been acknowledged in the session.
"
How then can durable subscriptions ever be deleted? I understand if you create a new one
with the same name and a new topic, it will effectively delete the old one. Is this the
only option?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199816#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...