<div>Ok, now I understand, thanks.</div>
<div>�</div>
<div>I find strange that primitiveCall do not follow the signature of original functions, with exchange and routing key provided along with the message.</div>
<div>�</div>
<div>I�am using extensively routing facilities of amqp, and I need to manage thousands of�clients, one per routing key (or do you think creating a channel and�a private queue is cheap enough to be done tens of time per second?)</div>

<div>�</div>
<div>I guess�you designed this RpcClient class more as an example, to be customized? That&#39;s�fine but code of RpcClient is not that simple and I would have prefered not to maintain that kind of risky low-level things... </div>

<div>�</div>
<div>Would you consider putting a primitiveCall(String exchange, String routingKey, AMQP.BasicProperties props, byte[] message) in a future release?</div>
<div>�</div>
<div>John</div>
<div><br>�</div>
<div class="gmail_quote">2011/11/21 Matthias Radestock <span dir="ltr">&lt;<a href="mailto:matthias@rabbitmq.com">matthias@rabbitmq.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">On 21/11/11 09:11, john doe wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Thank you Matthias.<br>If this class is known to *not* be threadsafe, why is there a<br>&quot;synchronized&quot; statement in primitiveCall? It somewhat confuses me.<br>
</blockquote><br></div>That synchronisation is necessary for the coordination of the thread issuing a call with the thread on which the reply arrives.<br><br>The code calls _channel.basicPublish, which is not threadsafe, outside of any synchronisation context. Hence it is not safe to issue calls from multiple threads or use the underlying channel in other threads.<br>
<font color="#888888"><br>Matthias.<br></font></blockquote></div><br>