I am expecting to get the previously published but unrouted message. Is this possible?
this is not directly possible.
if a message is not routed anywhere, it will disappear into the void. if you need to hang on to it, you must route it to a queue. there is no way to get a message that was previously sent nowhere, and re-route it.
your options for workarounds are very limited. you must always ensure a message is routed to a queue.
this can be done if you use a alternate exchange (https://www.rabbitmq.com/ae.html) to route messages that go nowhere, through a different exchange.
when a message goes nowhere through the first exchange, it will then go through the alternate exchange. at that point, you must ensure the message goes to a queue.
later, when you need to process the message that went through the alternate exchange, you will have to read the message from the queue that it is currently in and re-publish it through the correct exchange.