[zeromq-dev] zmsg_send blocked
Laurent Alebarde
l.alebarde at free.fr
Fri Jul 26 00:57:22 CEST 2013
Possibly you have requirements that makes you stick to a Router-Router
architecture. Otherwise, PUB-SUB is what you need.
As far as I have understood libzmq, with a R-R and a peer that
disconnects as a normal behaviour, your messages will accumulate in the
remaining node and will not be dropped.
For your specific blocking problem, have you tried with a poller ?
Hope it helps (but I am only a 0MQ beginner).
Cheers,
Laurent.
Le 25/07/2013 23:15, Yauheni Baltouski a écrit :
> Hi,
>
> I'm using czmq for building small router application, so I'm using
> ROUTER-ROUTER
> connection for dynamic connection and send/recv mesages over it.
>
> All looks like working fine (as it possible for R-to-R case :), but
> I'm in stuck
> with sending message when peer disconnected (it is expected behavior).
> So I want to continue processing, but zmsg_send is blocked with such
> backtrace:
>
> #0 0xb7fdd424 in __kernel_vsyscall ()
> #1 0xb7e89690 in __GI___poll (fds=0xbfffee18, nfds=1, timeout=-1) at
> ../sysdeps/unix/sysv/linux/poll.c:87
> #2 0xb7f9b618 in zmq::signaler_t::wait (this=0x80529d0, timeout_=-1)
> at signaler.cpp:145
> #3 0xb7f8f7e8 in zmq::mailbox_t::recv (this=0x80529a0,
> cmd_=0xbfffeeb0, timeout_=-1) at mailbox.cpp:69
> #4 0xb7f9c85d in zmq::socket_base_t::process_commands
> (this=0x80527b8, timeout_=-1, throttle_=false)
> at socket_base.cpp:823
> #5 0xb7f9cab0 in zmq::socket_base_t::send (this=0x80527b8,
> msg_=0x8077998, flags_=2) at socket_base.cpp:648
> #6 0xb7fae380 in s_sendmsg (s_=0x80527b8, msg_=0x8077998, flags_=2)
> at zmq.cpp:337
> #7 0xb7fae44b in zmq_sendmsg (s_=0x80527b8, msg_=0x8077998, flags_=2)
> at zmq.cpp:346
> #8 0xb7f5af50 in zframe_send (self_p=0xbffff00c, zocket=0x80527b8,
> flags=1) at zframe.c:211
> #9 0xb7f5f6fe in zmsg_send (self_p=0xbffff048, zocket=0x80527b8) at
> zmsg.c:133
> #10 0x0804a9e5 in getModuleList_event_item (key=0x805ce80 "605dd619",
> item=0x805e3d8, arg=0x8050038)
> at modrouter.c:193
> #11 0xb7f5c8ab in zhash_foreach (self=0x8050048, callback=0x804a780
> <getModuleList_event_item>,
> argument=0x8050038) at zhash.c:446
> #12 0x0804aad5 in getModuleList_event (loop=0x805c398, item=0x0,
> arg=0x8050038) at modrouter.c:215
> #13 0xb7f5eecd in zloop_start (self=0x805c398) at zloop.c:370
> #14 0x0804bc5c in main (argc=2, argv=0xbffff2c4) at modrouter.c:578
>
> Can somebody tells me what's wrong and how to avoid it? May be I
> should use
> ZMQ_DONTWAIT flag, but it not implemented in CZMQ.
> I want to send message independ of peer state, if it dead it should be
> just dropped.
>
> Thanks!
>
>
> _______________________________________________
> 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/20130726/31ac4ef4/attachment.htm>
More information about the zeromq-dev
mailing list