No enabled application monitor is on behalf of queue XYZ

时光怂恿深爱的人放手 提交于 2019-12-01 12:53:10

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!