Search code examples
auditingrebus

How can I consume all messages from an AuditQueue in Rebus using SQLServerPersistance?


I have Rebus'es Message Auditing feature turned on but currently nothing to consume the messages ending up in the queue. I want to be able to consume all the messages and simply write them to offline storage.

I don't need my AuditConsumer service to know about all the different types of messages, I just want to get the json data and write it to a file.

Is it possible to do this in Rebus?


Solution

  • There's no way (out of the box) to do what you are requesting - this is something that you would need to do yourself.

    You could fairly easily script something, though, that would use the SqlServerTransport to receive the messages from the audit "queue" and append them to a file.

    In the future Rebus will probably come with more options in this area in order to support the upcoming Fleet Manager (which will be a commercial all-in-one message auditing, debugging, and visualization tool).