> I'm guessing the subs cannot connect to many?
Guess again :) Here's a python example:
# start sub.py
import zmq
c = zmq.Context()
s = c.socket(zmq.SUB)
s.setsockopt(zmq.SUBSCRIBE, '')
s.connect('ipc://ep1')
s.connect('ipc://ep2')
while True:
m = s.recv()
print m
print ''
# end sub.
A small doubt ..
Currently I can see support for UDP, TCP and multicast sockets. Can't I use
UNIX domain sockets ? My purpose is to communicate between two process on
the same machine. I guess inproc is used for communication between two
threads of a process
Regards,
Ajith
---
Bind vs connect is independent of socket type. You can bind a SUB socket and
connect many PUB sockets to it.
So, you could have each service bind a PUB socket and a SUB socket, and then
connect each to all other services' SUB sockets and PUB sockets respectively.
On Sunday, February 17, 2013 07
Thank you for your reply, Witney, but I need it the other way. I need a sub
socket to be connected to multiple pub endpoints... This is because every
instance will have a single publisher, telling all who is interested about
events, but that same service will want to list to an arbitrary number
> Is it possible for a sub socket to bind to multiple pub sockets?
Yes. You can call bind and/or connect on a socket as many times at you like.
> If so, where is there an example of this?
Here's an example from the guide where a pub socket is bound to multiple
endpoints:
http://zguide.zeromq.or
Hi
You need to set socket options before connect.
Thanks
Min
2013년 2월 17일 일요일에 suraj nellikar님이 작성:
> Hi,
> I am using zmq 3.2 library on Ubuntu (32 bit machine). I am trying to run
> a test PUB-SUB model but the client is failing to set the sockopt to
> ZMQ_SUBSCRIBE. Any idea what am I doing
There is a zero copy API for JZMQ with this commit:
https://github.com/zeromq/jzmq/commit/336a8a1d3269483ba67bb903c8dc0b1482079a33
Cheers
On Sat, Feb 16, 2013 at 5:47 PM, Trevor Bernard
wrote:
> @gonzalo Did you do anything special on the client side to read the
> direct bytebuffer? My recvZero
Disregard my bug claims. I managed to figure this out.
https://gist.github.com/trevorbernard/4969705
I had a misunderstood has zmq_recv worked.
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
I'm receiving an EAGAIN error on the following bit of code.
JNIEXPORT jint JNICALL
Java_org_zeromq_ZMQ_00024Socket_recvZeroCopy (JNIEnv *env,
jobject obj,
jobject buffer,
jint length,
jint flags)
{
void* sock = get_socket (env, obj, 0);
jbyte* buf = 0;
int r
Hey guys,
So, I want to do a many to many pubsub. I already have a discovery mechanism
and logging, but what I need is for a service to bind to a pub socket and
subscribe to a set list of instances of itself on the server and other servers.
The Zyre framework, although awesome, seems a little
@gonzalo Did you do anything special on the client side to read the
direct bytebuffer? My recvZeroCopy isn't working ATM.
On Sat, Feb 16, 2013 at 4:28 PM, Trevor Bernard
wrote:
> Also you'll need to use ByteBuffer.allocateDirect(...) in order for it
> to work. I explicitly didn't check GetDirectB
Also you'll need to use ByteBuffer.allocateDirect(...) in order for it
to work. I explicitly didn't check GetDirectBufferAddress for perf
reasons.
For the JZMQ api, I used sendZeroCopy and recvZeroCopy for a lack of a
better/fancier name. ;)
-Trev
On Sat, Feb 16, 2013 at 4:26 PM, Trevor Bernard
I added support for zero copy send and recv.
https://github.com/zeromq/jzmq/issues/170
I haven't had time to test this but it compiles and the unit tests pass.
-Trev
On Fri, Feb 15, 2013 at 5:26 PM, The Carrolls wrote:
> Awesome! I'll be watching for it then.
>
> On 02/15/13 13:25, Trevor Bern
Minor Cython tweaks for rc3:
pip install
https://dl.dropbox.com/sh/nsww1t3adru9p3o/OD_MslRnkB/pyzmq-13.0.0-rc3.tar.gz
All RCs here: https://www.dropbox.com/sh/nsww1t3adru9p3o/JvkcvlOcxA
I expect this to be the last one before 13.0 release this week, unless I
hear about issues.
-MinRK
On Sat,
On Sat, Feb 16, 2013 at 7:13 AM, Ajith Adapa wrote:
> Hi,
>
> Anyone used the C bindings for zero-mq and have a sample example to share
> ??
>
> I would like to make a try.
>
> Regards,
> Ajith
>
http://zguide.zeromq.org/ is packed with examples!
Ian
15 matches
Mail list logo