You can just create one context and share between threads. You want to share the context between threads so that it can use "inproc" connections between threads.

The '1' is used to tell ZeroMQ to only use one io thread in the background. You generally don't need more than one unless you have ALOT of data.

Joshua

Erwin Karbasi wrote:

Hello Masters,

I'm using 0MQ's JAVA binding.
How can I create several Context objects per JVM as follows:

Context context = ZMQ.context(1);

Do I need create context per thread or I have other options?

What is the number parameter (1) purpose that we pass to the context
method?

Thanks in advance,
Erwin Karbasi
AT&T, Senior Software Architect
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to