[zeromq-dev] Question about ROUTER queue (what if client dies)

Pieter Hintjens ph at imatix.com
Wed Jul 23 20:25:26 CEST 2014

Can you make a minimal test case that reproduces this, by faking
timeouts and disconnects?

E.g. based on the skeleton I posted in another thread:

#include <czmq.h>

int main (void)
    zsock_t *router = zsock_new_router ("tcp://");
    zsock_t *dealer = zsock_new_dealer ("tcp://");

    zstr_send (dealer, "Hello World");
    zmsg_t *msg = zmsg_recv (router);
    zmsg_print (msg);
    zmsg_send (&msg, router);
    msg = zmsg_recv (dealer);
    zmsg_print (msg);

    zmsg_destroy (&msg);
    zsock_destroy (&router);
    zsock_destroy (&dealer);
    return 0;

On Mon, Jul 21, 2014 at 4:34 PM, Pedro Januário <prnjanuario at gmail.com> wrote:
> I have this exact same issue.
> Some time ago we had some issues with database connections.
> This leads us to our clients (dealer) started to exit with timeout and our
> router’s response queues started to get filled.
> Any advise, to avoid this?
> Regards,
> Pedro Januário
> Delivering Innovation and Technology
> _______________________________________________
> 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