You can now get the sequenceId and the message number (as a Long object) from the MessageContext using following property keys.
WSRMSequenceId
(Sandesha2Constants.MessageContextProperties.SEQUENCE_ID )
WSRMMessageNumber (Sandesha2Constants.MessageContextProperties.MESSAGE_NUMBER)
These will be available only after the SandeshaInHandler of the InFlow get called.
Chamikara
Hi Sanjesh,
Think ur sugestion will be useful. Will add this to the code.
If you check after the SandeshaGlobalInHandler (where the duplicate messages get eliminated) sequenceId-messageNo combination is globally unique for a perticular application message.
ChamikaraOn 9/12/06, Sanjesh Pathak < [EMAIL PROTECTED]> wrote:Hi Chamikara,
Thanks for the info, I will look into the code. I was thinking that Sandesha2 module might store Sequence Id and Sequence number as a property in MessageContext so one could for example get sequence id by calling something like msgContext.getProperty("RM_SEQUENCE_ID"). Also, is the combination of Sequence id and Sequence number (or message number) globally unique?
Thank you,
Sanjesh
From: Chamikara Jayalath [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 11, 2006 10:41 PM
To: Sanjesh Pathak
Cc: [EMAIL PROTECTED]
Subject: Re: Sequence Id and number in Sandesha2
Hi Sanjesh,
Sequence information comes as a header in the SOAP envelope. So you will have to go through the envelope and dig it out.
Sandesha has some helper classes which could be used to make this task easy. Hv a look at following code.
<code>
RMMsgContext rmMsgCtx = MsgInitializer.initializeMessage(msgCtx);
Sequence sequence = (Sequence) rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.SEQUENCE);
String sequenceId = sequence.getIdentifier().getIdentifier();
</code>
ChamikaraOn 9/11/06, Sanjesh Pathak <[EMAIL PROTECTED] > wrote:
Hi,
How can I get Sequence ID and Sequence number of a message from the Axis2 Message Context of the service side in Sandesha2?
Thanks,
Sanjesh
Real-Time Web Service Monitoring for Axis, Axis2
SoapKnox Inc
Ph: 832 279 3745
