Dropped Messages at Receive High Water Mark

Description

(This started as a mailing list post and then an issue on github before someone on IRC told me about Jira. Sorry for the proliferation...)

Here's the test harness (code attached):

`./pairpuller.c HWM` – Sets a ZMQ_PAIR socket's ZMQ_RCVHWM to HWM, connects it to a local tcp endpoint, and then receives messages indefinitely, printing the contents of each as a line of standard output.
`./pairpusher.c N` – Binds a ZMQ_PAIR socket to the same local tcp endpoint and sends N messages: "1", "2", "3", ...

Run `./pairpuller HWM` and `./pairpusher (HWM + 1)` for any value of HWM, and the final message is dropped. For example, `./pairpuller 1000` and `./pairpusher 5000` results in (correct) output from the former like this:

1
2
3
...
4999
5000

But `./pairpuller 2000` and `./pairpusher 2001` results in:

1
2
3
...
1999
2000

The message "2001" never arrives.

Environment

None

Attachments

2
  • 23 Jan 2012, 11:52 PM
  • 23 Jan 2012, 11:52 PM

Activity

Show:

Martin Sustrik January 25, 2012 at 5:22 AM

Looks similar IMO. However, let's keep this issue open until it's proved it is really a duplicate.

Mike Craig January 23, 2012 at 11:54 PM

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

Created January 23, 2012 at 11:52 PM
Updated January 25, 2012 at 5:22 AM