none
service broker external activation error RRS feed

  • Question

  • Hi, I am trying to setup externale activation with service broker but cannot get it to work.

    This is my code:

               


    CREATE MESSAGE TYPE [PricingMessage]



    CREATE CONTRACT [PricingContract]
    (
        [PricingMessage] SENT BY INITIATOR

    )

    CREATE QUEUE EquityPricingInitiatorQueue
    WITH STATUS = ON

    CREATE QUEUE EquityPricingTargetQueue


    CREATE SERVICE EquityPricingInitiatorService
    ON QUEUE EquityPricingInitiatorQueue 
    (
        [PricingContract]
    )

    CREATE SERVICE EquityPricingTargetService
    ON QUEUE EquityPricingTargetQueue
    (
        [PricingContract]
    )

    CREATE QUEUE EquityPricingExternalActivatorQueue


    CREATE SERVICE EquityPricingExternalActivatorService
    ON QUEUE EquityPricingExternalActivatorQueue
    (
        [http://schemas.microsoft.com/SQL/Notifications/PostEventNotification]
    )


    CREATE EVENT NOTIFICATION EventNotificationEquityPricingTargetQueue
        ON QUEUE EquityPricingTargetQueue
        FOR QUEUE_ACTIVATION
        TO SERVICE 'EquityPricingExternalActivatorService', 'current database';

    I use the following code to send a message to service broker:


    DECLARE @Handle UNIQUEIDENTIFIER;   
            BEGIN DIALOG CONVERSATION @Handle   
            FROM SERVICE [EquityPricingInitiatorService]   
            TO SERVICE 'EquityPricingTargetService'   
            ON CONTRACT [PricingContract]   
            WITH ENCRYPTION = OFF;   
            SEND ON CONVERSATION @Handle   
            MESSAGE TYPE [PricingMessage]('EQUITY');

    Service Broker External Activator Windows Service runs but I get this error message:

    INFO The External Activator service is starting.
    3/26/2015 5:26:59 PM INFO Initializing configuration manager ...
    3/26/2015 5:26:59 PM INFO Reloading configuration file C:\Program Files\Service Broker\External Activator\config\EAService.config ...
    3/26/2015 5:26:59 PM INFO Reloading configuration file completed.
    3/26/2015 5:26:59 PM INFO Initializing configuration manager completed.
    3/26/2015 5:26:59 PM INFO The External Activator service is running.
    3/26/2015 5:26:59 PM EXCEPTION ERROR = 32, No enabled application monitor is on behalf of queue [PRC01DBSQLDEV\PRC01].[PARC].[dbo].[EquityPricingTargetQueue].

    This is my EAService.config file:

    ?xml version="1.0" encoding="utf-8"?>
    <Activator xmlns="http://schemas.microsoft.com/sqlserver/2008/10/servicebroker/externalactivator"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://schemas.microsoft.com/sqlserver/2008/10/servicebroker/externalactivator EAServiceConfig.xsd"
               >
      <NotificationServiceList>
        <NotificationService name="EquityPricingExternalActivatorService" id="100" enabled="true">
          <Description>My test notification service</Description>
          <ConnectionString>
            <!-- All connection string parameters except User Id and Password should be specificed here -->
            <Unencrypted>Data Source=PRC01DBSQLDEV\PRC01;Database=PARC;Integrated Security=true;Connection Timeout=120</Unencrypted>
          </ConnectionString>
        </NotificationService>
      </NotificationServiceList>
      <ApplicationServiceList>
        <ApplicationService name="myMessageApp" enabled="true">
          <OnNotification>
            <ServerName>PRC01DBSQLDEV\PRC01</ServerName>
            <DatabaseName>Parc</DatabaseName>
            <SchemaName>dbo</SchemaName>
            <QueueName>EquityPricingTargetQueue</QueueName>
          </OnNotification>
          <LaunchInfo>
            <ImagePath>C:\svnrepo-NET\PricingCrossRef\PricingMessagePublisher\PricingMessagePublisher\bin\Debug\PricingMessagePublisher.exe</ImagePath>
            <CmdLineArgs></CmdLineArgs>
            <WorkDir>C:\svnrepo-NET\PricingCrossRef\PricingMessagePublisher\PricingMessagePublisher\bin\Debug</WorkDir>
          </LaunchInfo>
          <Concurrency min="1" max="1" />
        </ApplicationService>
      </ApplicationServiceList>
      <LogSettings>
        <LogFilter>
        </LogFilter>
      </LogSettings>
    </Activator>

    Any ideas what I am doing wrong?

    Thanks.

    Tuesday, March 31, 2015 8:19 PM

Answers

  • Hello bigmoviebuff,

    Unfortunately, this tool is not offcially supported by Microsoft.

    I did try to reproduce the issue while with no luck. The part of the service broker objects creation is ok. For EAService.config, below is a sample one your reference:

    <NotificationServiceList>
        <NotificationService name="my_notif_svc" id="100" enabled="true">
          <Description>my notification service</Description>
          <ConnectionString>
            <Unencrypted>server=my_pc01;database=my_db;Application Name=External Activator;Integrated Security=true;</Unencrypted>
          </ConnectionString>
        </NotificationService>
      </NotificationServiceList>
      <ApplicationServiceList>
        <ApplicationService name="myMessageApp" enabled="true">
          <OnNotification>
            <ServerName>my_pc01</ServerName>
            <DatabaseName>my_db</DatabaseName>
            <SchemaName>dbo</SchemaName>
            <QueueName>my_user_queue</QueueName>
          </OnNotification>
          <LaunchInfo>
            <ImagePath>c:\test\myMessageReceiver.exe</ImagePath>
            <CmdLineArgs>whatever cmd-line arguments you need to pass to your receiver application</CmdLineArgs>
            <WorkDir>c:\test</WorkDir>
          </LaunchInfo>
          <Concurrency min="1" max="4" />
        </ApplicationService>
      </ApplicationServiceList>

    Moreover, you can refer to these blogs for external activator configurations:http://devkimchi.com/811/service-broker-external-activator-for-sql-server-step-by-step-1/

    Cheers,

    Friday, April 3, 2015 7:37 AM

All replies

  • Hi bigmoviebuff,

    Thank you for your question.

    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.

    Thank you for your understanding and support.


    Eric Zhang
    TechNet Community Support


    Thursday, April 2, 2015 1:51 AM
    Moderator
  • Hello bigmoviebuff,

    Unfortunately, this tool is not offcially supported by Microsoft.

    I did try to reproduce the issue while with no luck. The part of the service broker objects creation is ok. For EAService.config, below is a sample one your reference:

    <NotificationServiceList>
        <NotificationService name="my_notif_svc" id="100" enabled="true">
          <Description>my notification service</Description>
          <ConnectionString>
            <Unencrypted>server=my_pc01;database=my_db;Application Name=External Activator;Integrated Security=true;</Unencrypted>
          </ConnectionString>
        </NotificationService>
      </NotificationServiceList>
      <ApplicationServiceList>
        <ApplicationService name="myMessageApp" enabled="true">
          <OnNotification>
            <ServerName>my_pc01</ServerName>
            <DatabaseName>my_db</DatabaseName>
            <SchemaName>dbo</SchemaName>
            <QueueName>my_user_queue</QueueName>
          </OnNotification>
          <LaunchInfo>
            <ImagePath>c:\test\myMessageReceiver.exe</ImagePath>
            <CmdLineArgs>whatever cmd-line arguments you need to pass to your receiver application</CmdLineArgs>
            <WorkDir>c:\test</WorkDir>
          </LaunchInfo>
          <Concurrency min="1" max="4" />
        </ApplicationService>
      </ApplicationServiceList>

    Moreover, you can refer to these blogs for external activator configurations:http://devkimchi.com/811/service-broker-external-activator-for-sql-server-step-by-step-1/

    Cheers,

    Friday, April 3, 2015 7:37 AM