Close
jGuru Forums
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) { 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
Re: Message sequence
Posted By: Andreas_Mueller Posted On: Monday, June 27, 2005 04:46 AM