简体   繁体   English

Sql Server Service Broker中的对话

[英]Conversations in Sql Server Service Broker

As I understand it, a Conversation will be delivered in order to one session. 据我了解,将进行一次会话以进行一个会话。

But what if I have a session that gets all the messages for a conversation, then, while they are being processed, a few more are added. 但是,如果我有一个会话可以获取会话的所有消息,那么在处理这些消息时会添加更多消息。

The session finishes and sends an End Conversation, but there are more in the queue so the initiator does not send the End Conversation. 会话结束并发送结束会话,但是队列中还有更多会话,因此发起方不发送结束会话。

The session that got the first messages is done/gone/no more. 收到第一条消息的会话已完成/消失/不再进行。 What will Service Broker do with the other messages? Service Broker将如何处理其他消息? Do they time out and then go to another session? 他们会超时然后再参加另一个会议吗?

Does it wait for the end conversation from the session that has the first messages? 它是否等待具有第一条消息的会话中的结束对话? (If not how does it guarantee the correct order?) (如果不能,那么如何保证正确的顺序?)

Or (worst case) are those messages never processed? 还是(最坏的情况)这些消息从未得到处理?

I tired to figure this myself by just observing, but the results are ambiguous enough that I would like an answer from someone who knows. 我只是通过观察就很难理解这一点,但结果却模棱两可,以至于我希望从认识的人那里得到答案。

When an EndDialog message is dispatched, Service Broker ensures all the pending messages in the queue are sent ahead of the EndDialog. 分派EndDialog消息时,Service Broker确保队列中所有未决消息都在EndDialog之前发送。 No more messages can be sent on that conversation, but messages can still be processed at the destination. 在该对话中无法再发送任何消息,但是仍然可以在目的地处处理消息。

At the receiving end the processor should continue to look for messages until it sees the EndDialog message - once it sees that it can close the conversation at its end, since it knows there can be no more messages for that conversation. 在接收端,处理器应该继续查找消息,直到看到EndDialog消息为止-一旦它知道可以在其结尾关闭对话,因为它知道该对话不再有消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM