Bulk update messages


We run nservicebus v 7.7.4

We discovered an issue in our production implementation and found that thousands of messages were failing. We need to bulk update the thousands of messageresend them. Is this possible? If so, what is involved? I’m not an nServicebus expert.

What’s the nature of the update those thousands of messages will require? Is it something that could be scripted or needs a manual update?

One of the properties in the payload caused all of the messages to fail. So, for example, we need to change a value from X to Y. I did read up on Behavior and possibly handling it that way. We are trying to avoid a hotfix.


This sample might be of help.

Thanks Sean. That’s the sample we are working off of. Do you know any other solutions? We were thinking we could update the Service Insight RavenDB with the new values, but no luck so far figuring it out.

You’d need to start SC in maintenance mode.

Thanks Sean. Yesterday we got RavenDB installed and connected to the nServiceBus ravenDB endpoint. What we can’t figure out is how do we update the message itself with the new value. Where do we find the table(s) where we can override the message body?

Unfortunately, I’m not much of a help there. There will be no tables, but collections. You’ll need to find more info about patching RavenDB documents. It’s a NoSql DB.

I recommend deploying a message-fixing behavior. This should also include a fix for the sender so that it will not emit any new corrupt messages.

If that isn’t possible than consider these alternatives:

Patch with TSQL when using SQL Transport

You haven’t shared which transport you are using. If you are using SQL Transport you might want to

  1. define a queue redirect in ServicePulse: Redirects • ServicePulse • Particular Docs
  2. retry all the relative messages
  3. see the messages being sent to that queue
  4. use SQLT to modify the messages to your liking
  5. INSERT… SELECT the messages to the correct table that represents the endpoint queue

Export, patch, import with QueueExplorer

If you are using MSMQ, Azure Service Bus or the RabbitMQ transports then you can use QueueExplorere by Cogin to export all queue data, patch all messages on the filesystem and then import these.

– Ramon