[rabbitmq-discuss] question on the RpcClient class

Randall Richard randall at trellisapp.com
Thu May 19 02:22:36 BST 2011


I happened to have the source code handy for RpcClient.  Looks like the
reply queue is set up via the setupReplyQueue() method below.

    /**
     * Creates a server-named exclusive autodelete queue to use for
     * receiving replies to RPC requests.
     * @throws IOException if an error is encountered
     * @return the name of the reply queue
     */
    protected String setupReplyQueue() throws IOException {
        return _channel.queueDeclare("", false, true, true,
null).getQueue();
    }

*queueDeclare<http://www.rabbitmq.com/releases/rabbitmq-java-client/v2.4.1/rabbitmq-java-client-javadoc-2.4.1/com/rabbitmq/client/Channel.html#queueDeclare(java.lang.String,
boolean, boolean, boolean, java.util.Map)>*(java.lang.String queue,
boolean durable, boolean exclusive, boolean autoDelete,
java.util.Map<java.lang.String,java.lang.Object> arguments)

So, it looks like it's declared with exclusivity as true.

Regards,

-Randall

On Wed, May 18, 2011 at 2:13 PM, kane <wtkane07 at gmail.com> wrote:

> I have a question regarding a class of the package com.rabbitmq.client
> the calss in question is RpcClient and use as follows:
>
>   RpcClient service = new RpcClient (channel, "", cost.request_queue);
>
>   return = service.stringCall (message);
>
>
> This calss I automatically generates a queue on which the client waits for
> a response.
>
> Let me know if this queue is exclusive?
>
> I make this question because in the javadoc documentation of the class is
> written as follows:
>
> rpcclient public (the English Channel,
>                     java.lang.String exchange,
>                     java.lang.String routingKey)
>              throws java.io.IOException
>
>        Building a new rpcclient that communicate on the designated channel,
> sending requests for data routing with the given key.
>
>        Causes the creation of a temporary private queue autodelete.
>
> ...
>
> The last sentence says that creates a temporary queue, autodelete and here
> we are, then says that the tail is private
>
> I wonder if the word in the phrase "private" is intended to be exclusive
> ...
> may seem trivial but sometimes a word changes the meaning of a sentence ...
> thanks!
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110518/afb7be4e/attachment-0001.htm>


More information about the rabbitmq-discuss mailing list