[zeromq-dev] ZMQ 2.2.1 / JNI / High water mark does have no effect

Andreas Finke Andreas.Finke at solvians.com
Wed Apr 30 20:54:38 CEST 2014


Hi all,

I have a question about a socket's high water mark setting. In our Java applications this setting does somehow not apply and we are ending up in using up native memory resulting in a crash of the application. I created a small example to show the problem.

http://pastebin.com/bkwbqUv7

1. A pull socket is created and bound to port 10000 (line 2)
2. The pulls socket does never receive any message
2. A push socket is created connecting to the pull socket (line 12)
3. A high water mark of 1 is set to both sockets (line 4 + 13)
5. Success of each sending try is printed to std out (line 21)

Both sockets are started as separate programs. In this scenario I would expect that the push client is able to deliver 2 messages due to the high water mark setting (1 + 1 ). I am ending up with:


Try 85742: true

Try 85743: false

This means about 80 T messages are queued before the push socket starts blocking.

Regarding the api doc http://api.zeromq.org/2-2:zmq-socket the behaviour of ZMQ_PUSH in case of an exceptional state (like high water mark is reached) should be "BLOCKING".

Does anyone has an idea what I maybe get wrong about this?

Thanks a lot in advance.

Andreas






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140430/750aeb88/attachment.htm>


More information about the zeromq-dev mailing list