There is a conversation_id
, which is the same at both endpoints.
And there is conversation_handle
, which must be different at each endpoint. Think at the very simply scenario when the initiator and target are in the same database. Had the conversation_handle
be the same then it would be ambiguous which endpoint you mean when you issue a SEND
. Did you send from initiator to target, or from target to initiator? If the handle is the same, can't distinguish! Therefore the handle must be different.
You always interact in your application with conversation_handle
. This is the value you pass to your T-SQL statements (SEND
, END
, MOVE
), and this is what BEGIN DIALOG
returns. The handle value never leaves the box (is not part of the message wire format).
You use the conversation_id
mostly in debugging. It can be used to identify your peer converstaion endpoint on a remote machine, it can be used to identify the conversation in message related events in SQL Profiler (Broker Event Category).
After you get past this A-ha moment, soon you'll be confused by the fact that conversation_group
is always local and does not travel on the wire. It was asked before here, read 1314050 or 6434464.
And there is one more id: the message_id
. This is assigned to the message during SEND
. It travels on the wire, and is use is only for debugging and troubleshooting. Eg. it features in Broker:Forwarded Message Dropped Event Class.