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

Can't create a publisher to publish directly to a queue? #766

Closed
DougC opened this issue Oct 18, 2022 · 2 comments
Closed

Can't create a publisher to publish directly to a queue? #766

DougC opened this issue Oct 18, 2022 · 2 comments
Labels

Comments

@DougC
Copy link
Contributor

DougC commented Oct 18, 2022

I may be missing something obvious, but I want to create a publisher that will publish messages directly to a queue and I can't see a method on RabbitClient that will allow me to do that. All the createPublisher methods expect an exchange name and routing key.

Essentially I'm after doing what's described in this example https://rabbitmq.com/tutorials/tutorial-one-java.html

@faustin0
Copy link

Hi @DougC , maybe you want to publish using the default exchange mechanism ?
https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchange-default
So, passing an empty exchange name and a routing key that matching the queue name you expect.
Something like this:
client.createPublisher[String]( ExchangeName(""), RoutingKey("my-queue-name") )

@stale
Copy link

stale bot commented Mar 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 18, 2023
@stale stale bot closed this as completed Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants