[zeromq-dev] CZMQ question re: use of zpoller

Johnny Depp sdusa at hotmail.com
Wed Apr 22 19:38:11 CEST 2020


Thanks for the answers. I will try to use json strings only if they actually work better than chunks. It is actually one of the future requirements, I was just trying to go in steps here.

One more question: would the version of curl library be the problem? I have a different requirement that asked for an updated libcurl library and I had the most recent version of it installed...

Thank you,

Johnny


________________________________
From: Brett Viren
Sent: Wednesday, April 22, 2020 1:38 PM
To: Johnny Depp
Cc: zeromq-dev at lists.zeromq.org
Subject: Re: [zeromq-dev] CZMQ question re: use of zpoller

Hi again,

Johnny Depp <sdusa at hotmail.com> writes:

> Yes, the pull socket is in only one thread

Okay.  Then I guess something else is going on.

> However, I switched to sending chunks of memory using zsock_brecv and
> zsock_bsend. And I am back to no reaction. At all.

Maybe no longer relevant but just one multi-thread related comment:
these "b" variants make use of ZeroMQ's "more" feature.  Each CZMQ frame
is passed to/from libzmq one at a time so state is kept behind the
scenes.  This is one particular case I've been cautioned (when I went
down the road of using thread-spanning sockets) will lead to problems.

> But I will recompile the library with the SERVER/CLIENT draft and see
> if that works better.

This will not be needed if indeed your sockets live entirely in one
thread.

But, if you do go to these thread-safe sockets one restriction we must
live with is that all messages will need to be "single-part".  So, the
"b" send/recv variants including "picture" messages of CZMQ won't work.

However, any multi-part zmsg_t can be encoded into a single-part
zframe_t using CZMQ zmsg_encode() just prior to a send and returned to a
multi-part zmsg_t with a zmsg_decode() just after a recv.

-Brett.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20200422/8e78194e/attachment.htm>


More information about the zeromq-dev mailing list