Request/Response Correlation Id in custom mediator

kirkm's picture
Is there an id in the MessageContext passed to a custom mediator that can be used to associate a response to a request? Goal is to have the custom mediator to save perf metrics into a data store. Kirk
ruwan's picture

Hi Kirk, If you set a

Hi Kirk, If you set a property with the given name (for example PERF_CORELATION_ID) and the required value in the incoming message context, this property will be available on the out message context and using this property and the assigned value you could correlate the out going message with the incoming message. Thanks, Ruwan Linton
asankha's picture

Kirk If you are looking for

Kirk If you are looking for a unique message identifier, you can use the MessageID. From your custom mediator, you can get this via mc.getMessageID() or if your code is a POJO, pass a parameter which is computed with the expression get-property('MessageID') asankha http://esbmagic.blogspot.com
kirkm's picture

Thanks Ruwan. I did not

Thanks Ruwan. I did not realize that properties set during the Request would be available on the Response. Got a sample mediator based on ESB samples working. Kirk
kirkm's picture

Thanks asankha. Kirk

Thanks asankha. Kirk
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)