Sequence of message's transfer from one service broker to second service broker

  • Hello,

    I try to transfer messages from one service broker to second service broker. I want to get messages in order I send? but in fact I receive its in different order. Why it happens? I do it so:

    DECLARE @conversationHandleXmlTransfer uniqueidentifier

    BEGIN TRANSACTION

    DECLARE @conversationHandleXml uniqueidentifier

    -- Start dialog.

    BEGIN DIALOG @conversationHandleXml

    FROM SERVICE [SourceService]

    TO SERVICE 'TargetService'

    ON CONTRACT [myconxml]

    WITH ENCRYPTION = OFF;

    -- Send message.

    DECLARE @id int

    set @id=1

    while(@id<=10)

    begin

    SEND ON CONVERSATION @conversationHandleXml

    MESSAGE TYPE [mymsg] (' ');

    set @id=@id+1;

    end

    COMMIT

    It woks. But when I send my messages once time again in other dialog, it receive in different order with messages that I receive the first time. Messages mix in two dialogs. I want to receive in order all my messages. How can I do this? Could I send my messages and indicate what dialog I want to use by sending?

    Thank you.

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply