Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow declaring a queue without specifying the name #92

@AntAgna

Description

@AntAgna

Code examples on https://rabbitmq.com for RPC recommend declaring a queue without a name to serve as channel for the response from the RPC server.
When we do this, the RabbitMQ server generates a random queue name for us.

See example here :
https://www.rabbitmq.com/tutorials/tutorial-six-dotnet.html
Relevant code in the RpcClient class:
replyQueueName = channel.QueueDeclare().QueueName;
We can see that the queue is declared without a name and then the code use the automatically generated name in the messages sent to the RPC server. The RPC server then sends the answer to this queue.

When trying to do the same with amqpcpp, declaring the queue fails with this exception : "the queue must to have the name".

So I think amqpcpp should allow doing the same thing :

  • Accept an empty name when declaring a queue
  • Use the name provided by RabbitMQ in that case

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions