Persist correlation id across HTTP requests

In my mule thread, the CorrelationId is set in the message, but after creating the outgoing http:request

message, it loses the Correlation ID.

What is the correct way to prevent losing Cid?

UPDATE

No matter what I tried, CorrelationId is always lost. I created a JIRA issue demonstrating the difference in behavior between http:outbound-endpoint

and http:request

https://www.mulesoft.org/jira/browse/MULE-8522 I don't think the CorrelationId is supposed to be lost in this case.

+3


source to share


1 answer


You can set the corrolation id on the outgoing message so that it is available on an external thread.

You can also see an example of adding a Corrolation ID to a message before sending to the outbound endpoint: - http://blogs.mulesoft.org/total-traceability/



UPDATE

Then use message enricher which completes the HTTP request component and this way you can get the value from the external service without breaking the actual payload and the existing corrollation id http://www.mulesoft.org/documentation/display/current/Message+ Enricher

+2


source







All Articles