How to delete a specific message from RabbitMQ Queue?

Consume Acknowledge Requeue

const deleteMessage = require('rabbitmq-delete-message');
const serverURL = 'amqp://localhost:15672';

deleteMessage(serverURL, 'MY_QUEUE', '6389503c-0281-412e-82cb-e92c97281b59')
.then((response) => {
if (response.deleted) {
console.log('Message was deleted');
console.log(response.message);
} else {
console.log('Message was not found');
}
})
.catch((err) => console.log(err));

Store all message in Database (and empty queue)

Consume then Queue then Dead Letter

Conclusion

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store