[zeromq-dev] JeroMQ crashes application
Michael Keselman
michael.keselman at gmail.com
Tue Aug 20 20:41:42 CEST 2013
Pieter,
Java is not well equipped for a memory barrier implementation. I used
in-memory queue (java.util.concurrent.ConcurrentLinkedQueue) with a pool of
consumers. Each consumer is running in a separate thread with a dedicated
socket. The consumer thread reads from the queue and send content to ZMQ.
It works very well and doesn't add much overhead. I may explain the
implementation in details in a blog if it make sense.
Thx
On Sun, Aug 18, 2013 at 1:29 AM, Pieter Hintjens <ph at imatix.com> wrote:
> On Thu, Aug 15, 2013 at 4:52 PM, Michael Keselman
> <michael.keselman at gmail.com> wrote:
>
> > At the moment I solved the problem by implementing a connection pool
> with a
> > number of connected sockets.
>
> Sounds fair; you just want to make sure there is a full memory barrier
> when switching sockets between threads. (I've no idea how to achieve
> this in Java, sorry.)
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
--
-Michael Keselman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130820/257801e5/attachment.htm>
More information about the zeromq-dev
mailing list