调用 Web 服务的 Service Broker 消息传递未结束
我有一个服务代理消息队列,每条消息都通过 CLR 存储过程调用 Web 服务来进行一些处理
我有一个问题,对话没有结束,它工作正常,它需要做的一切都已完成,但它没有错误,但即使调用 EndConversation,对话也永远不会结束。
它似乎是从 Web 服务调用返回并在 Web 服务正在执行的处理完成之前调用 EndConversation,因此会话不会结束并且消息会再次被调用。
无论如何,是否有办法在 Web 服务调用完成之前停止返回,以便消息队列中的对话可以成功结束。
我相信这就是正在发生的事情,因为如果我删除 Web 服务调用正在执行的一些工作,以便它运行得比一切正常运行更快,并且对话结束。
我还逐步完成了 Web 服务调用中发生的所有步骤,一切正常,没有错误等。
I have a service broker message queue, each message calls a web service via a CLR stored procedure to do some processing
I have an issue where the conversation does not end, it works fine, everything it needs to do is done, it doesn't error, but the conversation never ends even though EndConversation is called.
It seems to be coming back from the web service call and calling EndConversation before the processing that the web service is doing has completed, and so the conversation does not end and the message is called again.
Is there anyway to stop the web service call coming back before it has completed so then the conversation in the message queue can end successfully.
I believe this is what is happening because if i cut out some of the work the web service call is doing so that it runs quicker than everything runs fine and the conversation ends.
I have also stepped through all of the steps happening in the web service call, and everything works, there are no errors etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能需要看一些代码,尤其是发起者。
您是否使用显式事务?
确保在
END CONVERSATION
之后有一个COMMIT TRANSACTION
语句。May need to see some of the code, especially the initiator.
Are you using explicit transactions?
Make sure you have a
COMMIT TRANSACTION
statement afterEND CONVERSATION
.