Answer the question
In order to leave comments, you need to log in
Why aren't all nginx+push-stream messages coming?
Maybe someone can help figure it out.
I'm trying to create a chat.
The bottom line is that nginx + push-stream is installed on centos.
Everything seems to be working, the only BUT, if the messages were sent at the same time, then only one comes, which is sent faster for a moment.
Does anyone know how to deal with this?
PS: Configured for this article
Answer the question
In order to leave comments, you need to log in
As I understand the work of long-polling, this is holding the connection until some message appears there or time runs out. If a connection appears, then it picks it up and reconnects and waits again. So?
If so, then maybe the fact is that while he is reconnecting the second message is no longer there? Or am I misunderstanding something? Or how can I receive old messages and those that I have already received?
Has anyone else experienced this and knows how to overcome it?
Maybe it's in the settings:
http {
…
server {
…
location /publish {
push_stream_publisher admin;
push_stream_channels_path $arg_id;
push_stream_store_messages on;
allow 127.0.0.1;
}
location ~ /subscribe/(.*) {
push_stream_subscriber long-polling ;
push_stream_channels_path $1;
push_stream_longpolling_connection_ttl 30s;
push_stream_last_received_message_time $arg_time;
push_stream_last_received_message_tag $arg_tag;
}
}
push_stream_shared_memory_size 32M;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question