Quantcast

Durable Subscriptions

classic Classic list List threaded Threaded
3 messages Options
oci
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Durable Subscriptions

oci
Hi,

As it is written in the documentation :
"Durable subscriptions are implemented as queues. The name of a these queues are formed by this pattern:
      <clientid>$<durablename>  "

Does it mean that I can access such queues using the JMS Java API ?

I want to browse the durable subscription using aQueueSession.createBrowser(..) but can't retrieve the queue using InitialContext.lookup("<clientid>$<durablename>").

I have checked in the SwiftMQ Explorer JNDI Swiftlet and the durable subscriptions are not published in JNDI. Is there an alternative way to reach it ?

Can you tell me where I'm wrong ? Is there a way (with an other API ?) to achieve this ?

Thanks in advance,

Regards,

Olivier
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Durable Subscriptions

IIT Software
Administrator
True is that a QueueBrowser can only be created on a queue. This is JMS spec. Every queue that has a $ in it's name is considered as a system queue and is not being registered in JNDI. So you cannot access it from outside.

What you can try is this:

QueueBrowser browser = session.createBrowser(new QueueImpl("clientid$durablename"));

However, the session where you create the browser from must be a QueueSession, otherwise you'll get an exception.
oci
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Durable Subscriptions

oci

It works and completely fits my needs.

Thank you very much.
Loading...