No enabled application monitor is on behalf of queue XYZ

前端 未结 2 830
无人共我
无人共我 2021-01-16 04:00

I created a console application which will be used by \"Service Broker External Activator\" service. The configuration file in \"C:\\Program Files\\Service Broker\\External

相关标签:
2条回答
  • 2021-01-16 04:36

    The more likely cause for this is that you are using "localhost" in the ServerName element. I just reproduced it in my working example by changing ServerName to localhost.

    The ServerName and the ConnectionString's server MUST be an actual computer name, a machine name specifically, not a DNS name either.

    If you make the ConnectionString's server localhost, then nothing will happen after the service starts. You won't get an error, but activation will not occur.

    0 讨论(0)
  • 2021-01-16 04:39

    This may help you if issue still exists.

    If all the SSSB objects and event notification set properly then need to see, how message is getting push to notification queue.

    Below is the message format you have to use and send it to notification queue,

    DECLARE @RequestMsg XML
    SELECT @RequestMsg = N'<EVENT_INSTANCE>
       <EventType>QUEUE_ACTIVATION</EventType>
       <PostTime>' + CONVERT(CHAR(24),GETDATE(),126) + '</PostTime> 
       <SPID>' + CAST(@@SPID AS VARCHAR(9)) + '</SPID> 
       <ServerName>ServerName</ServerName>   -- use @@SERVERNAME to eliminate hard code 
       <LoginName></LoginName>    -- you can skip this element 
       <UserName></UserName>      -- you can skip this element 
       <DatabaseName>DatabaseName</DatabaseName> -- use DB_NAME() to eliminate hard code 
       <SchemaName>dbo</SchemaName>
       <ObjectName>NotifyQueue</ObjectName>
       <ObjectType>QUEUE</ObjectType>
    </EVENT_INSTANCE>';
    

    Also be careful with the values in each section of the message it should match with config values of [EAService.config], see the comments in above XML structure.

     <ApplicationService name="myMessageApp" enabled="true">
      <OnNotification>
        <ServerName>ServerName</ServerName>
        <DatabaseName>DatabaseName</DatabaseName>
        <SchemaName>dbo</SchemaName>
        <QueueName>NotifyQueue</QueueName>
      </OnNotification>
      <LaunchInfo>
    

    The reason for doing this way is, there is logic in service which do match of SSSB message values with values of EAService.Config, on successful match given application is getting executed.

    Hope this will help you if you are having same issue alive.

    0 讨论(0)
提交回复
热议问题