我有 2 个队列和更多队列...我想使用外部激活器从外部激活这些队列。
当我编辑 EAService.config 以激活 queue#1 时,它工作得很好。
当我编辑 EAService.config 以激活 queue#2 时,它工作得很好。
如果我将两者都放在配置中,则只有第一个列出的那个会被激活。
两个队列实际上都由同一个 exe 处理......而不起作用的例子是......
<NotificationServiceList>
<NotificationService name="my_notif_svc1" id="100" enabled="true">
<Description>my notification service 1</Description>
<ConnectionString>
<Unencrypted>server=my_pc01;database=my_db;Application Name=External Activator;Integrated Security=true;</Unencrypted>
</ConnectionString>
</NotificationService>
<NotificationService name="my_notif_svc2" id="100" enabled="true">
<Description>my notification service 2</Description>
<ConnectionString>
<Unencrypted>server=my_pc01;database=my_db;Application Name=External Activator;Integrated Security=true;</Unencrypted>
</ConnectionString>
</NotificationService>
</NotificationServiceList>
<ApplicationServiceList>
<ApplicationService name="myMessageApp1" enabled="true">
<OnNotification>
<ServerName>my_pc01</ServerName>
<DatabaseName>my_db</DatabaseName>
<SchemaName>dbo</SchemaName>
<QueueName>my_user_queue1</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>
<ApplicationService name="myMessageApp2" enabled="true">
<OnNotification>
<ServerName>my_pc01</ServerName>
<DatabaseName>my_db</DatabaseName>
<SchemaName>dbo</SchemaName>
<QueueName>my_user_queue2</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>
另外我不明白 id="100" 在做什么...我尝试使用相同的 # 和不同的 #... 即 100 和 101 但它没有任何区别。激活器服务仅适用于“ApplicationServiceList”中列出的第一个
帮助!