Let's say I have two queues i.e. queue1 and queue2. I have messages in queue1 which I stored in a JSON file by using the following command.
curl -u user:pass -H "content-type:application/json" -XPOST http://192.168.178.23:15672/api/queues/testvhost/queue1/get -d'{"count":5,"ackmode":"ack_requeue_true","encoding":"auto","truncate":50000}' -o m1.json
with the help of this post:- RabbitMQ - Get messages from a queue using curl
My JSON file looks like this:- https://paste-me.net/fibed
I am trying to push this JSON file (messages) to another queue queue2 with the help of the following command:
curl -i -u user:pass -H "Accept: application/json" -H "Content-Type:application/json" -X POST -d @m1.json http://192.168.178.23:15672/api/exchanges/testvhost/queue2/publish
HTTP/1.1 500 Internal Server Error
content-length: 0
But it seems to be not working.
Any help will be appreciated and please don't suggest to me an idea about the shovel.
ThankYou.
