Audit queue maintenance

185 views
Skip to first unread message

mohit raghav

unread,
Jan 18, 2015, 7:33:31 PM1/18/15
to particula...@googlegroups.com
Helpful information to include
Product name: NserviceBus
Version: 4.6.5


Hi All,

We have enabled MSMQ audit. Can someone please provide any information on audit queue maintenance?

We are trying to achieve the following:

1. Backup audit queue messages older than x days (not whole queue).
2. Delete audit queue messages older than x days (not whole queue).
3. Restore (A) message from back to audit queue back (if required).
4. Cleanup msmq under C:\Windows\System32\msmq\storage.


Thanks
Mohit

Ramon Smits

unread,
Jan 25, 2015, 5:36:49 AM1/25/15
to particula...@googlegroups.com

Hi Mohit,

The default behavior is that messages are automatically expired after a certain configurable amount of time (OverrideTimeToBeReceived) from the audit queue. This will be done by MSMQ itself.

     http://docs.particular.net/nservicebus/auditing-with-nservicebus

If you are using Service Control then SC will read the messages from the audit queue, store it internally and then store it in the audit log queue. 

So depending on your environment you either have to read the message from the audit or audit.log queue. Just make sure you archive all message data including the headers.

When a message is written to the audit queue you do not really have to wait to archive/backup it as that is what I think you want to do.

With restoring you probably want to read a set of message from your audit archive and send it to the correct endpoint so that it will be processed again?

I dont understand what you are referring to with 'Cleanup msmq'. Could you explain your expectations?


Regards,
Ramon

Ramon Smits

unread,
Jan 25, 2015, 5:47:36 AM1/25/15
to particula...@googlegroups.com


Mohit,

What is your goal when you want to restore message from the archive?

If your goal is to send them to the endpoints to let them be processed again then make your message messages are idempotent so that processes are not executed again.

Regards,
Ramon

On Monday, January 19, 2015 at 1:33:31 AM UTC+1, mohit raghav wrote:
Reply all
Reply to author
Forward
0 new messages