zeromq / azmq

C++ language binding library integrating ZeroMQ with Boost Asio
Boost Software License 1.0
319 stars 109 forks source link

PUSH socket overflows #150

Open cc32d9 opened 5 years ago

cc32d9 commented 5 years ago

I'm developing this module using AZMQ, and it doesn't go well: https://github.com/EOSChronicleProject/eos-chronicle/blob/81dbe977a264fcf674d95ef941a5479ef30f78bc/chronicle-receiver/exp_zmq_plugin.cpp

the data is written quite intensively with async_send, and it's not limited by high watermark like the synchronous socket would do. If there's no recipient attaching to that socket, the sender keeps sending endlessly. As soon as the recipient connects to the socket, the sender bails out with "Cannot allocate memory" exception.

Why is it not limited by HWM? I would assume it should do it like the traditional ZMQ library does.

rodgert commented 5 years ago

Is there any chance I could get a minimal reproduction case?

cc32d9 commented 5 years ago

well in the meanwhile I dropped the idea of supporting ZMQ, and now using websockets only.

But the reproduction case should be quite easy to build, just send to ASMQ socket in an endless loop and you will see it.