Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Sequence of message's transfer from one service broker to second service broker Expand / Collapse
Author
Message
Posted Tuesday, August 12, 2008 9:04 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 13, 2008 8:03 AM
Points: 1, Visits: 2
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.
Post #551090
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse