Skip to content

Help with Curl and api call to publish message to a queue #14328

Closed Answered by michaelklishin
mundenp asked this question in Questions
Discussion options

You must be logged in to vote

The key question here is whether MyQueue is an exchange. It's not. So why do you expect RabbitMQ to treat a queue as if it was an exchange?

Another question to ask: in AMQP 0-9-1, do you publish directly to queues? No, you don't, you publish to an exchange, in particular the management UI form uses the virtual hosts's default exchange which makes it look like you were publishing to a queue.

Publishing over the HTTP API is greatly discouraged. If you have to do it, use rabbitmqadmin v2:

# "amq.default" is a way to reference the default exchange that the HTTP API supports
# to avoid confusing empty strings used by AMQP 0-9-1 clients
rabbitmqadmin --vhost "/" publish message --exchange "amq.…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by michaelklishin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants