0
我正尝试将服务代理对话移至另一个群组对话。 的代码是:移动会话错误
declare @handle uniqueidentifier;
declare @conversationGroup uniqueidentifier;
begin dialog conversation @handle
from service ConsolidatorService
to service 'ConsolidatorTargetService'
on contract [//Gereon/Consolidator/ConsolidatorContract]
with encryption = off;
get conversation group @conversationGroup from [ConsolidatorTargetQueue];
if(@conversationGroup is not null)
move conversation @handle to @conversationGroup;
send on conversation @handle message type [//Gereon/Consolidator/GeBasicChangesMessage]
(@MessageBody);
但SQL Server返回我的错误 目标会话组 '60EEBC15-E75E-E611-80CC-00155D090304' 是无效的。
我不明白为什么get对话返回的group_conversation_id无效。
谢谢
我想要做的是创建一个在队列上发送消息的触发器,另一方面存储过程接收它们。但我想要的是,消息在同一个conversation_group中关联。消息的顺序并不重要,但对话很重要,因为sp必须接收与相同correlation_group_id(sp一次只能接收1 msg)相关的所有消息。我试过这个[链接](http://stackoverflow.com/questions/38878407/ms-sql-server-2012-service-broker-begin-conversation-error?noredirect=1#comment65142517_38878407),但没有成功 – zappasan
反向的方向应该适合你。 –
好的,我已经尝试以这种方式编写“从ConsolidatorTarget到ConsolidatorTargetService”的开始对话框,并且它工作正常。但是,这听起来有点奇怪,以这种方式为发起者编写开始对话框,因为发起者服务不是目标。 – zappasan