[zeromq-dev] Is it a bad idea to create and destroy 0MQ sockets frequently?
Chuck Remes
lists at chuckremes.com
Mon Aug 19 22:36:35 CEST 2013
Yes, creating and destroying a lot of sockets very rapidly is an anti-pattern. If each thread needs its own socket, I recommend that it should check it out from a (thread-safe) pool and then check it back in again after it completes its work.
On Aug 19, 2013, at 3:34 PM, crocket <crockabiscuit at gmail.com> wrote:
> A few days ago, Michael Keselman reported his issue with JeroMQ to zeromq-dev as below.
>
> "I have two use cases:
> 1) short-living threads within my application (under 10 milliseconds)
> 2) threads that are initiated and managed by an outside application which calls my code. My code is executed also in a few milliseconds timeframe
>
> in either case the I have a few msec to connect and publish a message. If when I tried to open a socket within those few milliseconds, JeroMQ crashed with the following stack trace after ~90,000 calls."
>
> It sounds like a bad news.
>
> Is it probably a bad idea to create and destroy 0MQ sockets tens of times per second in libzmq, too?
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130819/d707d664/attachment.htm>
More information about the zeromq-dev
mailing list