Search code examples
loggingesbpublish-subscribemasstransit

Message tracing in mass transit


I use masstransit as service bus and I use pub/sub pattern for my application.

I would like to figure out if I can track message that comes up from the bus to subscribers.

I use json serializer.

Does MT have some 'entry point' in which I can get raw message body?


Solution

  • Hmm, when you call Publish, there is a callback that can be invoked for each subscriber. I'm not sure it gives you access to the serialized message body, but the serializer may be associated with the IPublishContext by that that, which might be usable if you want to serialize to a memory stream or file stream.