We are leaving Russia. We are against aggression and war with Ukraine. It is a tragedy for our nations, it is a nightmare

Hangfire Redis Changing Prefixes

My team is needing to change the redis prefix that hangfire is using for storing the jobs. Currently if we were to change the prefix the existing jobs would no longer be picked up. Are there any suggestions on a clean way to migrate or have hangfire be backwards compatible to the old prefixes?

Outside of Hangfire, you could duplicate each value of the old prefix with the new prefix.

Alternatively, you could try configuring two instances of Hangfire, one old and one new. If not already using it, change your implementation to use IBackgroundJobClient. Then have IBackgroundJobClient point to the new server so the old server doesn’t get any new jobs.

I really like that second option, as I had already tried writing something to do the first one. I ran a trial run and it took far too long with a much smaller subset in our test environment. I was able to already put a proof of concept of the 2nd option together for one application. I just hope the other application will be as easy to do.