Details
Description
The current implementation of AbstractResponseRouter does not let the user configure how to correlate the request and the response. The default implementation uses messageid to correlationid pattern.
// AbstractResponseRouter.java
protected Object getCallResponseAggregateIdentifier(UMOMessage message)
{ return correlationExtractor.getProperty(MuleProperties.MULE_MESSAGE_ID_PROPERTY, message); }protected Object getReplyAggregateIdentifier(UMOMessage message)
{ return correlationExtractor.getProperty(MuleProperties.MULE_CORRELATION_ID_PROPERTY, message); }Can it be modified to support other patterns as well.
For e.g.
<response-router timeout="60000">
<global-endpoint name="endpointname"/>
<router className="com.test.routing.response.CustomCorrelationResponseRouter">
<properties>
<property name="replyAggregateID" value="MULE_CORRELATION_ID"/>
<property name="responseAggregateID" value="MULE_CORRELATION_ID"/>
</properties>
</router>
</response-router>
protected Object getReplyAggregateIdentifier(UMOMessage message)
{
if(this.replyAggregateID == null)
return correlationExtractor.getProperty(this.replyAggregateID, message);
}
protected Object getCallResponseAggregateIdentifier(UMOMessage message)
{
if(this.responseAggregateID == null)
return correlationExtractor.getProperty(this.responseAggregateID, message);
}
Regards
Ragu
... and the question is?