Solved

what does setJMSCorrelationID and setClientID

Posted on 2007-11-16
1
515 Views
Last Modified: 2008-02-18
in some of the examples for published/subscriber messaging, i see the use of setJMSCorrelationID() and setClientID().  the documentation for them don't seem to be very clear.  what do they do?  and are they essential?  

i am try to create a durable subscriber, and i didn't use these two methods, and the subscriber seems to be working fine as far as getting messages that it subcribes for.  
0
Comment
Question by:mmingfeilam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 13

Accepted Solution

by:
Bart Cremers earned 250 total points
ID: 20303744
The JMSCorrelationID header field is used for linking one message with another. It typically links a reply message with its requesting message.

I don't know where you did get the setClientID() from because that method is not specified in the JMS specification.

So, in short, they are not at all essential, only there for you to make life easier.

eg. In our system we use JMSCorrelationIDs to map a message to a record in a database table. The JMSCorrelationID is passed on to several message driven beans, so the last bean in the queue can update the final state of the record in the database.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
xampp tool 12 59
Opening PDF on button click and fill new document 2 54
String array comparison 4 46
Github api to fetch the number of collaborators in a git repo 1 31
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question