Service Broker: are my messages sent from Initiator? if so, nothing comes to the target...

Hi,

I am following this tutorial https://technet.microsoft.com/en-us/library/bb839496(v=sql.105).aspx . I create DB instances of initiator and target on two different servers (one is my local machine). I start the conversation. At first I thought the target was never getting the messages for unknown reasons. But now I starting to think maybe the messages are never sent...

In Initiator DB, 

select * from sys.transmission_queue

returns a couple of rows of the messages I sent to the target. My first question is: if the message are in the transmission_queue, does it actually mean they are waiting to be sent? The column transmission status is all blank.

I opened SQL Profiler for Initiator DB and selected every possible Service Broker event. When running the code of lesson 4 (which starts the conversation and send a message to the target), I have the following events recorded:

  • Broker: Conversation Group -> 1 - Create. 
  • Broker: Conversation -> 11 - Begin dialog
  • Broker: Conversation -> 1- Send message
  • Broker: Message Classify -> 2 - Remote

I am also trying to use ssbdiagnose but I am not sure how.

On the target side, transmission queue is empty. Getting the latest message returns null. Sql Profiler set up with service broker events is totally blank. I am assuming that there is nothing coming to it, therefore nothing is leaving the initiator.

What is the next step to debug this situation please?

 
  • Edited by GregCSharp Friday, March 27, 2015 2:35 PM better display
March 27th, 2015 2:33pm

Hi

if the message are in the transmission_queue, does it actually mean they are waiting to be sent?

If a message is still in the transmission_queue it means that it has yet to be acknowledged by the target. So it could have been sent, just not acknowledged. 

On the assumption that you haven't moved onto the next lesson it would be expected that the message would still be in the queue, as the acknowledgement hasn't been sent back.

Have you checked the target queue?

SELECT TOP 50 *, casted_message_body = 
CASE message_type_name WHEN 'X' 
  THEN CAST(message_body AS NVARCHAR(MAX)) 
  ELSE message_body 
END 
FROM [InstTargetDB].[dbo].[InstTargetQueue] WITH(NOLOCK)


  • Edited by jmcmullen Friday, March 27, 2015 4:25 PM
Free Windows Admin Tool Kit Click here and download it now
March 27th, 2015 4:24pm

To verify that the permissions are correct you'd need to go into the properties of the folder, open the security tab, then click on advanced. The checkbox could be visible at that point. You should verify permissions are correct on both servers. 

It does sound like there's some kind of problem with your certificates or authentication between the instances.

Are your two servers part of a domain? If so I'd be inclined to use windows authentication rather than certificates. 

March 28th, 2015 9:47am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics