Hi,

I will try to elaborate more on my problem.
I have implemented the exchangeSent() method of the ExchangeListener class to 
intercept message exchanges and log them to a file. In addition to this, I also 
need to log the flow of messages between various components, i.e., I need 
information about the source and destination endpoints.

In the case of an in-only MEP, there is a request from the consumer to the 
provider and the provider in turn sends a "done" message to the consumer. 
I want to log each of these 2 messages and then I need a flow that says
EndPoint1------>EndPoint2(for the active message)
EndPoint2------>EndPoint1(for the Done message)

Is this possible to be done?

Regards,
Nandini

-----Original Message-----
From: ext Freeman Fang [mailto:[email protected]] 
Sent: Thursday, May 13, 2010 2:21 PM
To: [email protected]
Subject: Re: How to get the source and destination endpoints of a message 
exchange

Hi,

My comment inline
On 2010-5-13, at 下午4:27, Bhat, Nandini (NSN - IN/Bangalore) wrote:

>
> Hi,
>
> Just adding onto my previous query…..
> I'm using me.getEndpoint() to get the destination endpoint and  
> me.getProperty(JbiConstants.SENDER_ENDPOINT) to get the source  
> endpoint where 'me' is the message exchange.
> For messages whose status is "Active", I'm able to get the source  
> and destination endpoints correctly using the above code. However,  
> for messages whose status is "Done", the source and destination  
> endpoints are not updated and still show the old ones. My guess is  
> that only the status is updated in the same message exchange  
> instance and all other information is the same as that of the  
> previous message exchange. Is my understanding correct? If yes, then  
> the information about source and destination endpoints is highly  
> confusing to the user and is not reliable.
>

This is expected behavior, actually the MessageExchange with status  
"Active" and "DONE" is one MessageExchange, but with different status,  
so the Source and Destination should same.
Why do you think it's not reliable?

Freeman
> Is there any other reliable way of getting the source and  
> destination endpoints?
> Can anyone please reply to my query? I'm in urgent need of some help  
> regarding this issue.
>
> Regards,
> Nandini
>
>> _____________________________________________
>> From:        Bhat, Nandini (NSN - IN/Bangalore)
>> Sent:        Wednesday, May 12, 2010 12:38 PM
>> To:  [email protected]
>> Subject:     How to get the source and destination endpoints of a  
>> message exchange
>>
>>
>> Hi,
>>
>> I'm writing a class that implements the ExhangeListener class and I  
>> need to log the flow of messages between endpoints in the  
>> exchangeSent() method.
>> So I need to find a way to get the source and destination endpoints  
>> of a message exchange.
>> Is there a way to do this?
>>
>> Regards,
>> Nandini


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com

Reply via email to