[rabbitmq-discuss] using client from different threads

Steve Powell steve at rabbitmq.com
Mon Dec 5 12:21:47 GMT 2011

Since Rabbitmq 2.7.0 it has been  possible to use a channel from multiple
threads in the Java client, however doing so may block one or other of the
threads if you are using a synchronous command.

Since consumers now run their 'callbacks' on threads separate from the channel
and connection threads, it is now possible to call the channel from within
these callbacks, without deadlocking.  Again, you should understand the
threading implications.

'Using the RpcClient from different threads' is probably a little more tricky.
However, publishes use the channel interface so ought to be OK, although all
RpcClient 'calls' will be serialised, of course.

We are currently looking to enhance the RpcClient/Server code, to make them
more flexible (being able to call several servers from one client, for example)
and re-usable (reducing the interface and making it more basic), building it on
the standard interface, rather than using the implementation classes (as it
does now).  We are, of course, interested in any problems you detect with the
current RpcClient/Server implementations.

Steve Powell  (a christmas bunny)
----------some more definitions from the SPD----------
avoirdupois (phr.) 'Would you like peas with that?'
distribute (v.) To denigrate an award ceremony.
definite (phr.) 'It's hard of hearing, I think.'
modest (n.) The most mod.

On 5 Dec 2011, at 10:13, Mysurf Mail wrote:

> 1. Is it ok to use the same channel from different threads?
> 2. Is it ok to use RPC client from different threads
> [I am trying to narrow down on the cause of my problems (usage of close rpc queue). ]
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

More information about the rabbitmq-discuss mailing list