[zeromq-dev] CZMQ zloop some design questions.

Pieter Hintjens ph at imatix.com
Tue Aug 5 16:20:09 CEST 2014


I'd advise against using zloop for this. The callbacks are
over-complex. On both client and server, use zpoller, and process each
message sequentially, sending replies back as necessary.

On Tue, Aug 5, 2014 at 3:29 PM, Kurt Degiorgio <kurt.degiorgio at gfi.com> wrote:
> Hi,
>
>
>
> I am using zloop to create a full duplex asynchronous communication
> DEALER/ROUTER (C++)
>
>
>
> I implemented the receiving side by using zloop_reader
>
>
>
> I am not sure about the best approach re-sending,  since the  thread is
> blocked by zloop_start and the ZMQ guide says that zmq sockets are not
> thread safe,
>
>
>
> As such the only other viable option that I am seeing is through
> zloop_timer, i.e. have a FIFO queue which will be filled up with messages
> from other threads, when  the timer is fired by zero MQ check if there is
> any message to send and send them,
>
>
>
> Is this the right way to go? Or is there a more efficient pattern
> available?
>
>
>
> Thanks!
>
>
>
>
>
>
>
>
>
>
>
>
>
> DISCLAIMER
> The information contained in this electronic mail may be confidential or
> legally privileged. It is for the intended recipient(s) only. Should you
> receive this message in error, please notify the sender by replying to this
> mail. Please do not read, copy, forward or store this message unless you are
> an intended recipient of it - unauthorized use of contents is strictly
> prohibited. Unless expressly stated, opinions in this message are those of
> the individual sender and not of GFI. While all care has been taken, GFI is
> not responsible for the integrity of and that of the contents of this
> electronic mail and any attachments included within.
>
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>



More information about the zeromq-dev mailing list