Friday, May 7, 2010

TrackingId, MessageId, RequestId, CorrelationId....

I am fascinated by the topic of TRACKING MESSAGES. I feel that one of the biggest mistakes in a SOA environment is the failure to provide an instantaneous way to uniquely identify an interaction (request) with the system and tracking it across all the bloody infinity of interconnected systems.

One thing that I have clear in mind is that one should label the Originated Message with a unique RequestId, and use MessageId and CorrelationId purely to correlate request-response in Asynchronous leg on the entire message trip (the concept of JMSMessageID and JMSCorrelationID is explained here ).

There doesn't seem to be a standardization on message tracking information format.

A nice way of tracking messages could be this

    <slg:CustomHeader xmlns:slg="">

In OSB, you have a variable $messageID (format is 6192059538496460915-f22b838.1287d7f67bd.-7f76) which can be used to uniquely identify any message inside the OSB.
Beware! If PS1 invokes PS2, a new messageID will be generated inside PS2, so you cannot use messageID to track a global message flow inside OSB (do you have a reason for that? Perhaps...).

to be continued...

No comments: