[zeromq-dev] Working with invalid socket combinations

Pieter Hintjens ph at imatix.com
Thu Nov 28 09:32:26 CET 2013


This kind of bridging between sockets is perfectly normal, and the
core for many brokers and proxies.

On Thu, Nov 28, 2013 at 2:27 AM, Raffi <raffidice at nextideapartners.com> wrote:
> Hi,
>
> I want to integrate message flow between incompatible socket types; is there
> anything technically wrong with doing the following? I've got it working,
> all seems fine, I just want to make sure doing so will not expose me to api
> issues down the road. I understand REQ, REP, and ROUTER frames messages
> based on identities, but I know how to work around that in this context.
>
> Socket puller = ctx.createSocket(ZMQ.PULL);
> Socket publisher = ctx.createSocket(ZMQ.PUB);
> ...
> publisher.send( puller.recv());
>
> or
>
> Socket router = ctx.createSocket(ZMQ.ROUTER);
> router.send(puller.recv());
>
>
>
> Thanks
>
> Raffi
>
>
> _______________________________________________
> 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