none
Express Edition as sender and reply to

    Question

  • Hello

    Trying to get my head around this Sql Service Broker.

    It's called a dialog and I guess that is exactly what I would like, but... 

    My scenario:

    1 initiator and 1 target, two different servers.

    I've tried to built some of the basic examples and this all works fine and dandy, but they are all 1-way, a sort of fire and forget with guaranteed delivery.

    What I want is a setup where the initiator start a conversation, sends a message and resume common operation flow. Then the target processes the message and send a reply back to the initiator at the the conversation handle (correct me if I'm wrong) and the initiator then consumes the message and do it's thing.

    But as I see it, that requires both the initiator and the target to be standard editions right? Or is it enough if just the receiver is a standard edition or greater?

    Something that confuses me.... why is it called a target when SSSB is meant to be a dialog? Imho a target is only a target in a monolog?


    Sunday, June 30, 2013 3:59 PM

Answers

  • But as I see it, that requires both the initiator and the target to be standard editions right? Or is it enough if just the receiver is a standard edition or greater?

    Although you cannot have a conversation between 2 express editions, you can converse between different editions where one is Express Edition.  So an Express initiator and Standard target (receiver) or visa-versa is possible.

    Something that confuses me.... why is it called a target when SSSB is meant to be a dialog? Imho a target is only a target in a monolog?

    It's just a matter of terminology.  A dialog requires 2 parties.  The terms initiator and a target are used to distinguish between the two sides of the conversation.  Both parties can send and receive messages to one another.

    You mention fire-and-forget but the conversation remains open until ended on both sides with END CONVERSATION.  If you use the pattern of a singe-message-per-conversation, one would typically end the conversation at the target first and then end the conversation on the initiator side when the corresponding EndDialog (or Error) message is received.

    If you use a single conversation that runs indefinitely for multiple messages, the target wouldn't end the conversation.  The initiator would end a conversation after an Error message is received and begin a new conversation afterward.


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    Sunday, June 30, 2013 4:43 PM

All replies

  • But as I see it, that requires both the initiator and the target to be standard editions right? Or is it enough if just the receiver is a standard edition or greater?

    Although you cannot have a conversation between 2 express editions, you can converse between different editions where one is Express Edition.  So an Express initiator and Standard target (receiver) or visa-versa is possible.

    Something that confuses me.... why is it called a target when SSSB is meant to be a dialog? Imho a target is only a target in a monolog?

    It's just a matter of terminology.  A dialog requires 2 parties.  The terms initiator and a target are used to distinguish between the two sides of the conversation.  Both parties can send and receive messages to one another.

    You mention fire-and-forget but the conversation remains open until ended on both sides with END CONVERSATION.  If you use the pattern of a singe-message-per-conversation, one would typically end the conversation at the target first and then end the conversation on the initiator side when the corresponding EndDialog (or Error) message is received.

    If you use a single conversation that runs indefinitely for multiple messages, the target wouldn't end the conversation.  The initiator would end a conversation after an Error message is received and begin a new conversation afterward.


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    Sunday, June 30, 2013 4:43 PM
  • For distributed Service Broker, where messages are routed between SQL Server instances, either the initiator, the receiver or some intermediate instance on the route must be Standard Edition or higher.

    The typical scenario is to have a hub-and-spoke model where the spokes may be Express (on PCs or in branches etc), and the Hub is a Enterprise Edition or Standard Edition.  In this case the spokes can have dialogs among themselves, but the messages must route through the hub.

    > why is it called a target?

    The dialog has an initiator and a target so that you can define a contract that allows different messages to flow to the target than flow back to the initiator.  EG your contract can specify that the initiator sends InventoryRequest messages to the target and the target sends InventoryResponse messages back.

    David


    David http://blogs.msdn.com/b/dbrowne/

    Sunday, June 30, 2013 6:28 PM