Message sequence
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ASHOK_Chawla
Posted On:   Friday, June 24, 2005 08:37 AM

Issue: The Events of different Event Type are arriving at the Client in different sequence. Details: We have 2 types of events (MessageEvent and CommandResponseEvent). The Client TopicSubscriber is of Normal type (and not a Durable Subscriber). We find that the eventHandler is receiving the 2 types of events is getting them in different sequence than that sent by the sender. Code snippet of the Client - the handleEvent calls processEvent - processEvent is synchronized to make sure different thread would not result in order garble public void handleEvent(java.io.Serializable evt,String eventName) { proces   More>>

Issue:


The Events of different Event Type are arriving at the Client in different sequence.


Details:
We have 2 types of events (MessageEvent and CommandResponseEvent). The Client TopicSubscriber is of
Normal type (and not a Durable Subscriber).


We find that the eventHandler is receiving the 2 types of events is getting them in different sequence than that sent by the sender.


Code snippet of the Client
- the handleEvent calls processEvent


- processEvent is synchronized to make sure different thread would not result in order garble



public void handleEvent(java.io.Serializable evt,String eventName)


{
processEvent(evt, eventName);
}


synchronized public void processEvent(java.io.Serializable evt, String eventName)


{


try
{


if (evt instanceof NEOSCommandResponseEvent)
{
.... code


}


else if (evt instanceof NEOSMessageEvent)
{
..... code
}


}
catch (Exception ee)
{


.. code
}
}





Actually two message are coming with-in same milisecond. But order is different from what was published.




Do we need to use TransactedConnection while publishing these messages ?




Regards


Ashok Chawla

   <<Less

Re: Message sequence

Posted By:   Andreas_Mueller  
Posted On:   Monday, June 27, 2005 04:46 AM

Do you publish both messages from the same JMS session to the same topic?


You subscriber uses a single JMS session with a single TopicSubscriber?
About | Sitemap | Contact