Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow declaring a queue without specifying the name #92

Open
AntAgna opened this issue Aug 6, 2021 · 2 comments
Open

Allow declaring a queue without specifying the name #92

AntAgna opened this issue Aug 6, 2021 · 2 comments

Comments

@AntAgna
Copy link

AntAgna commented Aug 6, 2021

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
@reunanen
Copy link
Collaborator

reunanen commented Aug 6, 2021

You can just remove the check – works fine, at least on my machine: 8365a67

That "fix" is included in PR #78, together with other improvements I've found useful. So you may want to try and use my develop branch.

@AntAgna
Copy link
Author

AntAgna commented Aug 9, 2021

It turns out being able to disable SSL is quite useful for me.
So I will be using you develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants