-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
php-ext unexpected behaviour of ZMQ_LINGER=0 #3234
Comments
I'm not sure I follow - what exactly is the issue? If you close a program with linger 0 then messages may be dropped |
PUSH socket with linger 0 stop to send messages to alive PULL one, it may send like 1 of 5 tries. PUSH socket has short fpm-script life, when PULL socket is still alive as cli. My goal is to do not receive messages by crushed and reran PULL socket from PUSH message queue. |
I still don't follow. You've set linger 0, and then the script exits after sending. Is that right? |
That's right. You can see php example here |
That's working as intended. If you don't want messages to be lost, set linger to infinite. |
You didn't catch the point. I want them to be lost. But if I set linger 0 there no delivered messages at all during alive sockets. |
Yes. That's because the script exits and the sockets are killed before the messages are delivered. That's what linger is for. |
Got it. Thanks! |
Issue description
Could you please verify that php-ext behaviour is incorrect according to this issue
Environment
Minimal test code / Steps to reproduce the issue
create persistent context
create socket (PULL)
bind to tcp://127.0.0.1:5555
recv in cycle
create another persistent context
create another socket (PUSH)
set socket opt ZMQ_LINGER = 0
connect to tcp://127.0.0.1:5555
send message
What's the actual result? (include assertion message & call stack if applicable)
There is like 1 of 5 sent messages (step 5-9) received.
What's the expected result?
5 messages received.
The text was updated successfully, but these errors were encountered: