8 Replies Latest reply on Feb 23, 2010 10:22 AM by Pieter Martin

    JMS and correlationID ?

    Pieter Martin Novice

      Hi,

       

      I am using the JMSMessageID and JMSCorrelationID to sync the responses.

       

      I have a Set<String> messageIDs containing the ids for every message sent.

      On the result queue I then remove the ids and when the set is empty I know that I have received a response for every message sent.

       

      However as one can only retrieve the JMSMessageID after the message has already been sent it happens that the response comes back before the Set<String>messageId has been set.

       

      producer code...

       

      queueFactory.getExecutorProducer().send(message);

      messageIds.add(message.getJMSMessageID());

      jmsExecutorResultListener.setMessageIds(messageIds);

       

      Is there something wrong with my design?

       

      Thanks

      Pieter