Publishing to the default rabbitmq exchange using the http api

后端 未结 1 1861
情歌与酒
情歌与酒 2021-02-12 15:01

So I am using rabbitmqs http api to do some very basic actions in rabbit. It works great in most situations but I am having an issue figuring out how to use it to publish a mess

相关标签:
1条回答
  • 2021-02-12 15:41

    This is the way to publish a message to amq.default:

    http://localhost:15672/api/exchanges/%2f/amq.default/publish

    with this body

    {"properties":{},
     "routing_key":"queue_test",
     "payload":"message test ",
     "payload_encoding":"string"}
    

    routing_key is the queue where you will publish the message.

    Following an example using a chrome plug-in:

    0 讨论(0)
提交回复
热议问题