Service Broker neophyte question: conversation_id and conversation handle

within the context of the sys.conversation_endpoints system view, there is:
1. A conversation_handle
   and
2. A conversation_id

What are the differences between these two items

Thanks.

Doug   


Answer this question

Service Broker neophyte question: conversation_id and conversation handle

  • Jay S

    thanks Rushi.

    that helps.

    doug

  • bluej41

    conversation_id uniquely identifies a conversation and is the same at both the initiator as well as target. On the other hand conversation_handle uniquely identifies a conversation endpoint and is different for a given conversation at the initiator and the target.

    You should use conversation_handles for sending or receiving messages on a conversation just like you would use sockets if you were programming TCP.

    The reason the conversation_handle is different at the initiator and the target is because if both endpoints were in the same broker (i.e. in the same database), you should be able to distinguish the two endpoints.


  • Service Broker neophyte question: conversation_id and conversation handle