Ignoring message behaviour / mutator

Hey there,

I have two instances of an NServiceBus service:

  1. One older running as a Windows Service
  2. One newer running as a docker / .net core worker service

There have been some pretty major changes / breaking changes between the two incarnations of the service, but both subscribe to the same events coming from the rest of our ecosystem.

What we want to be able to do as we push on toward production is deploy the two services side-by-side and then take all traffic off the old service and roll it over to the new service by using a feature flag to delineate which one is enabled (Old vs New, etc)

Now, since both services will be running at the same time and both listening for events on the queue, I was wondering if there is a straightforward means of having one or the other of these two services (via a Behaviour or Mutator) to “ignore” inbound event messages, thus just letting them remain on the queue for the other to pick them up. So when the feature flag is set to “Old”, the old service’s handlers would receive and process the events, while the new service would just ‘ignore’ the events since the feature flag says to do so. Once the feature flag is toggled to “New” this would reverse, so that the old service would ignore inbound events and the new service’s handlers would process the inbound events.

Any help would be most appreciated.

Hi Chris,

What transport are you using? And do the two endpoints have the same logical endpoint name or are they considered different logical endpoints (are both endpoints consuming from the same queue)?