Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Service Broker / October 2006

Tip: Looking for answers? Try searching our database.

SSB appears to receives on wrong conversation handle

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Farmer - 19 Oct 2006 17:16 GMT
Thanks for your time and help.

Question:

I have two queues. I stated two way conversation between those queues like below.

conversation_handle   conversation_id    conversation_group_id  is_initiator state_desc

807C24E6-855F-DB11-963A-000F1F0C79EB 83AA46C0-4199-4EEF-8044-57FECF46C61E 817C24E6-855F-DB11-963A-000F1F0C79EB 1 CONVERSING
837C24E6-855F-DB11-963A-000F1F0C79EB 83AA46C0-4199-4EEF-8044-57FECF46C61E 827C24E6-855F-DB11-963A-000F1F0C79EB 0 CONVERSING

847C24E6-855F-DB11-963A-000F1F0C79EB E12D80AE-3F17-44B3-B95B-48B93F966378 857C24E6-855F-DB11-963A-000F1F0C79EB 1 CONVERSING
877C24E6-855F-DB11-963A-000F1F0C79EB E12D80AE-3F17-44B3-B95B-48B93F966378 867C24E6-855F-DB11-963A-000F1F0C79EB 0 CONVERSING

I sent a message on one initiator conversation handle like this out of activation procedure on the INITIATOR queue

SEND ON CONVERSATION '807C24E6-855F-DB11-963A-000F1F0C79EB' MESSAGE TYPE [//???.com/SSB/Messages/Task]
('<Tasks><row acttID="1" FromsttID="135" TosttID="11" actID="157" olnID="5981" actoID="2"/></Tasks>');

SEND ON CONVERSATION '807C24E6-855F-DB11-963A-000F1F0C79EB' MESSAGE TYPE [//???.com/SSB/Messages/Task]
('<Tasks><row acttID="1" FromsttID="135" TosttID="11" actID="155" olnID="5981" actoID="2"/></Tasks>');

I have two threads waiting on respective TARGET conversation handles like

thread1

SET @conversation_handle = '837C24E6-855F-DB11-963A-000F1F0C79EB'

       WAITFOR (
           RECEIVE TOP(1)
               @conversation_handle = conversation_handle
               ,@conversation_group_id = conversation_group_id
               ,@message_type_name = message_type_name
               ,@Message =  CAST(message_body AS XML)
           FROM [dbo].[inResponseWorkerQueue]
           WHERE conversation_handle = @conversation_handle
       );

and

thread2

SET @conversation_handle = '877C24E6-855F-DB11-963A-000F1F0C79EB'

       WAITFOR (
           RECEIVE TOP(1)
               @conversation_handle = conversation_handle
               ,@conversation_group_id = conversation_group_id
               ,@message_type_name = message_type_name
               ,@Message =  CAST(message_body AS XML)
           FROM [dbo].[inResponseWorkerQueue]
           WHERE conversation_handle = @conversation_handle
       );

I get the thread2 receive the messages sent on 807C24E6-855F-DB11-963A-000F1F0C79EB conversation handle.

But Why? This looks wrong.

Any ideas?

thanks

Farmer

I log with simple
       insert ##tasks (msg, task, received) values ('spSSB_utlWorkerProcessor acttID 17', @message, getdate())
Roger Wolter[MSFT] - 19 Oct 2006 19:10 GMT
You're right.  That should be impossible.  Please write the conversation handles - the one you are listening on and the one in the received message into your trace.

Signature

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

 Thanks for your time and help.

 Question:

 I have two queues. I stated two way conversation between those queues like below.

 conversation_handle   conversation_id    conversation_group_id  is_initiator state_desc

 807C24E6-855F-DB11-963A-000F1F0C79EB 83AA46C0-4199-4EEF-8044-57FECF46C61E 817C24E6-855F-DB11-963A-000F1F0C79EB 1 CONVERSING
 837C24E6-855F-DB11-963A-000F1F0C79EB 83AA46C0-4199-4EEF-8044-57FECF46C61E 827C24E6-855F-DB11-963A-000F1F0C79EB 0 CONVERSING

 847C24E6-855F-DB11-963A-000F1F0C79EB E12D80AE-3F17-44B3-B95B-48B93F966378 857C24E6-855F-DB11-963A-000F1F0C79EB 1 CONVERSING
 877C24E6-855F-DB11-963A-000F1F0C79EB E12D80AE-3F17-44B3-B95B-48B93F966378 867C24E6-855F-DB11-963A-000F1F0C79EB 0 CONVERSING

 I sent a message on one initiator conversation handle like this out of activation procedure on the INITIATOR queue

 SEND ON CONVERSATION '807C24E6-855F-DB11-963A-000F1F0C79EB' MESSAGE TYPE [//???.com/SSB/Messages/Task]
 ('<Tasks><row acttID="1" FromsttID="135" TosttID="11" actID="157" olnID="5981" actoID="2"/></Tasks>');

 SEND ON CONVERSATION '807C24E6-855F-DB11-963A-000F1F0C79EB' MESSAGE TYPE [//???.com/SSB/Messages/Task]
 ('<Tasks><row acttID="1" FromsttID="135" TosttID="11" actID="155" olnID="5981" actoID="2"/></Tasks>');

 I have two threads waiting on respective TARGET conversation handles like

 thread1

  SET @conversation_handle = '837C24E6-855F-DB11-963A-000F1F0C79EB'

         WAITFOR (
             RECEIVE TOP(1)
                 @conversation_handle = conversation_handle
                 ,@conversation_group_id = conversation_group_id
                 ,@message_type_name = message_type_name
                 ,@Message =  CAST(message_body AS XML)
             FROM [dbo].[inResponseWorkerQueue]
             WHERE conversation_handle = @conversation_handle
         );

 and

 thread2

  SET @conversation_handle = '877C24E6-855F-DB11-963A-000F1F0C79EB'

         WAITFOR (
             RECEIVE TOP(1)
                 @conversation_handle = conversation_handle
                 ,@conversation_group_id = conversation_group_id
                 ,@message_type_name = message_type_name
                 ,@Message =  CAST(message_body AS XML)
             FROM [dbo].[inResponseWorkerQueue]
             WHERE conversation_handle = @conversation_handle
         );

 I get the thread2 receive the messages sent on 807C24E6-855F-DB11-963A-000F1F0C79EB conversation handle.

 But Why? This looks wrong.

 Any ideas?

 thanks

 Farmer

 I log with simple
         insert ##tasks (msg, task, received) values ('spSSB_utlWorkerProcessor acttID 17', @message, getdate())
Farmer - 19 Oct 2006 20:43 GMT
Please disregard this foolish post. How could I doubt this?
I am so sorry bt I fell victim of my own logging.
I verified all this over and over and I found my issue.

It all works
GREAT!
GREAT!
GREAT!

It is all so cool! Thank you MS team.
It is a beautiful product addition to SQL 2005.
I have my gears going in overdrive with places where I would use this now.

Awesome.

 Thanks for your time and help.

 Question:

 I have two queues. I stated two way conversation between those queues like below.

 conversation_handle   conversation_id    conversation_group_id  is_initiator state_desc

 807C24E6-855F-DB11-963A-000F1F0C79EB 83AA46C0-4199-4EEF-8044-57FECF46C61E 817C24E6-855F-DB11-963A-000F1F0C79EB 1 CONVERSING
 837C24E6-855F-DB11-963A-000F1F0C79EB 83AA46C0-4199-4EEF-8044-57FECF46C61E 827C24E6-855F-DB11-963A-000F1F0C79EB 0 CONVERSING

 847C24E6-855F-DB11-963A-000F1F0C79EB E12D80AE-3F17-44B3-B95B-48B93F966378 857C24E6-855F-DB11-963A-000F1F0C79EB 1 CONVERSING
 877C24E6-855F-DB11-963A-000F1F0C79EB E12D80AE-3F17-44B3-B95B-48B93F966378 867C24E6-855F-DB11-963A-000F1F0C79EB 0 CONVERSING

 I sent a message on one initiator conversation handle like this out of activation procedure on the INITIATOR queue

 SEND ON CONVERSATION '807C24E6-855F-DB11-963A-000F1F0C79EB' MESSAGE TYPE [//???.com/SSB/Messages/Task]
 ('<Tasks><row acttID="1" FromsttID="135" TosttID="11" actID="157" olnID="5981" actoID="2"/></Tasks>');

 SEND ON CONVERSATION '807C24E6-855F-DB11-963A-000F1F0C79EB' MESSAGE TYPE [//???.com/SSB/Messages/Task]
 ('<Tasks><row acttID="1" FromsttID="135" TosttID="11" actID="155" olnID="5981" actoID="2"/></Tasks>');

 I have two threads waiting on respective TARGET conversation handles like

 thread1

  SET @conversation_handle = '837C24E6-855F-DB11-963A-000F1F0C79EB'

         WAITFOR (
             RECEIVE TOP(1)
                 @conversation_handle = conversation_handle
                 ,@conversation_group_id = conversation_group_id
                 ,@message_type_name = message_type_name
                 ,@Message =  CAST(message_body AS XML)
             FROM [dbo].[inResponseWorkerQueue]
             WHERE conversation_handle = @conversation_handle
         );

 and

 thread2

  SET @conversation_handle = '877C24E6-855F-DB11-963A-000F1F0C79EB'

         WAITFOR (
             RECEIVE TOP(1)
                 @conversation_handle = conversation_handle
                 ,@conversation_group_id = conversation_group_id
                 ,@message_type_name = message_type_name
                 ,@Message =  CAST(message_body AS XML)
             FROM [dbo].[inResponseWorkerQueue]
             WHERE conversation_handle = @conversation_handle
         );

 I get the thread2 receive the messages sent on 807C24E6-855F-DB11-963A-000F1F0C79EB conversation handle.

 But Why? This looks wrong.

 Any ideas?

 thanks

 Farmer

 I log with simple
         insert ##tasks (msg, task, received) values ('spSSB_utlWorkerProcessor acttID 17', @message, getdate())
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.