使用 nginx+pushstream 模块进行长轮询是否可能会丢失消息?
我阅读了我能找到的所有文档、论坛和示例,但找不到有关 的描述Pushstream 模块 在以下情况下表现:
我使用 nginx+pushstream 在会话队列中为请求在服务器端花费一点时间的操作的用户传递状态消息。
使用长轮询技术,每次传递消息或达到连接超时时,客户端都会重新连接。
如果有很多消息同时发送到订阅队列,客户端在重新连接时是否有可能丢失消息?或者这种情况是由pushstream模块处理的?
感谢大家花时间阅读和回答! :-)
I read thru all documentation, forums and examples I could find but could not find a description on how the pushstream module behaves in the following situation:
I am using nginx+pushstream to deliver status messages at a session queue for users that requested actions that take a little while on the server side.
Using the long polling technique the client is re-connecting every time a message was delivered or the connection timeout is reached.
If there are many messages sent to the subscribed queue at the same time, is it possible that the client could miss a message while he is re-connecting? Or is this situation handled by the pushstream module?
Thanks to everyone taking time to read and answer! :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对不同主题的一些随机搜索在 Google 网上论坛中找到了一个回答该问题的帖子。
pushstream 模块开发人员在回复中指出:
来源:https://groups.google.com/forum/#!topic/nginxpushstream /4VutBQwx3zM
这意味着如果存储消息(
push_stream_store_messages
设置为上)。HTTP 标头
If-None-Match
和If-Modified-Since
将确保这一点。Some random search for a different topic turned up a thread in the Google Groups that answers the question.
The pushstream module developer states in a response:
Source: https://groups.google.com/forum/#!topic/nginxpushstream/4VutBQwx3zM
This means that it is not possible to loose messages if messages are stored (
push_stream_store_messages
is set to on).The HTTP-Headers
If-None-Match
andIf-Modified-Since
will make sure of this.