I have two applications communicating with each other through a RabbitMQ virtual host, using Masstransit as an abstraction layer.
I am trying to create a third application which logs all the published messages to this virtual host, while, not knowing up front what these message types are.
If I knew the messages up front, it would be easy; I would just create some consumers. Unfortunate this is not the case.
I tried the Observers, but they only seem to work if the observed bus is the same as the one which sends the messages. So this wouldn't work cross-application.
From the rabbit's docs I found this would be easy by using rabbit MQ bindings, but, this does not seem to be supported: Publish message using exchange and routing key using MassTransit
I also tried: How to log all Rabbit MQ messages?, but it seems a dead-end as well because I want to log the data in the custom format to a database.
It seems I am missing a trivial thing, but after searching whole day, I haven't found the desired result. Can you get me on the right track?
For bus configuration, in all 3 applications I am using the straight forward configuration pattern:
_bus = Bus.Factory.CreateUsingRabbitMq(cfg =>