zeromq / azmq

C++ language binding library integrating ZeroMQ with Boost Asio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PUSH socket overflows

cc32d9 opened this issue · comments

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.

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

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.