Forums Register Login

JMS Durable Subscriber Example

+Pie Number of slices to send: Send
Hi,
Please does anyone have a durable subscriber example in jms through which I can clear my concepts ?. I have understood the theory, but I would like to have a code example through which I can clear my concepts. Where does clientID figure in the code and how is it used in durable subscriber example ? Please do explain me. I am using JBoss 5.0.0-G.A. application server. Any help would be highly appreciated.

Thanks.
+Pie Number of slices to send: Send
check out this article on ibm developer works, it explains why you need clientId:
IBM Websphere Technical Journal
+Pie Number of slices to send: Send
Hi,
I read this article. I read the description of ClientID but I still didn't get where clientID is used in the code. Please help me understand wherein the code do we use clientID.

I am using JBoss-5.0.0GA as my app. server. I have set the client ID in the <mbean> tag in the file connection-factories-service.xml. Now I didn't get where do we use the client ID in durable subscription code. Please help me understand this. Thanks.

+Pie Number of slices to send: Send
You set the client id in your jms connection. For my example i am using websphere MQ 7.0 as my jms messaging provider and my enterprise application is deployed on WAS 6.1, so i set the client id on my mq connection factory properties. My durable subscriber MDB then looks up this connection factory as an administered object.

Hope that makes sense.
+Pie Number of slices to send: Send
Is clientID same as subscription name ?
+Pie Number of slices to send: Send
Any update on this query ???
+Pie Number of slices to send: Send
For a durable subscritpion you need combination of topic name, clientId and subscriber name. When you create your TopicSubscriber from your jms session you need to provide your topic and a name for the subscriber. This uniquely identifies the subscriber to the topic.

See http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/TopicSession.html#createDurableSubscriber(javax.jms.Topic,%20java.lang.String)
So I left, I came home, and I ate some pie. And then I read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 5047 times.
Similar Threads
question about durable JMS subscription.
Doubt in JMS pub/sub model
Doubt in JMS pub/sub model
Durable Subscriber Problem
Problem in using durabl subscribers
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 06:29:06.