azure-service-bus icon indicating copy to clipboard operation
azure-service-bus copied to clipboard

Fall Through filter subscription

Open mikewo opened this issue 5 years ago • 12 comments

Description

Actual Behavior

  1. By default if you deliver a message to a topic that doesn't have a subscription, or there are filtered subscriptions that don't end up getting the message because it doesn't match the filters, the message essentially just goes away. No one cared about it, which makes sense for the message to then just disappear.

Expected Behavior

  1. It would be nice to be able to actually create a type of subscription that was to catch these types of messages in order to determine if there is mis-configuration in the system. The goal would be to catch if someone starts sending messages to a topic that no one is paying attention to that type of message, which could be a flag of mis-configuration somewhere. I know there exists the EnableFilteringMessagesBeforePublishing which may be useful in catching these scenarios in development, but I'm also interested in catching them in production as well.
  2. I image this is a special type of Filter you would set when you create the subscription (a peer to Correlation, SQLFilter, etc.) that the server would see and then if a message wasn't delivered to any other subscription a copy of it would be placed in this last subscription.
  3. The system would only allow one of these fall through filters on a topic at a time. Attempting to add another one would result in an exception when attempting to create the subsequent subscription with this type of filter.

mikewo avatar Apr 19 '19 11:04 mikewo

What would you expect to be the behaviour for the messages caught previously when their type is subscribed to later and messages of that type where not consumed from the special subscription? For those messages to remain in this special subscription or get purged?

SeanFeldman avatar Apr 19 '19 15:04 SeanFeldman

They would remain. I don't expect any specific action to occur if someone adds a subscription that starts getting the messages. The "fall through filter" subscription simply wouldn't get any more of them. It would be up to me to know that we've corrected the issue and then perhaps push messages of that type from the fall through filter back through to correctly process.

Ideally, in this set up the fall through filter subscription should be pretty much empty unless something gets misconfigured, or perhaps an existing filtered subscription gets accidentally deleted. Anything landing in this fall through would then show up as big red flag that something is wrong. You'd react to this, correct the issue, and then know you have to reprocess the items, which could mean just having something resubmit the messages back to the topic, and if the system is corrected then they would get processed as expected (aka, they shouldn't end up back in the fall through subscription).

Likewise, if someone turned on a "trueFilter" for a subscription I would expect this fall through filter to basically get nothing, but any existing messages in it would be left alone. Any other approach would mean that if someone turned on a trueFilter, or simply added a subscription with no defined filter (which is just a true filter really), then all the messages in the fall through would then be gone. I don't want that type of behavior. I feel like it's still important for the fall through subscription to be worked and handled as necessary, just as managing a Dead Letter Queue is an exercise that has to happen.

mikewo avatar Apr 19 '19 20:04 mikewo

I have the same need. Just don't want to lose messages due to some misconfiguration\deletion by mistake.

Fabiest avatar Apr 20 '19 14:04 Fabiest

I want to up this issue.

We are migrating from RabbitMq to the ServiceBus and we are stuck with lack of troubleshooting features.

There is no detection of routing failures. The legacy api have TopicDescriptor.EnableFilteringMessagesBeforePublishing feature but the new one does not.

Also, there is no analog of RabbitMQ's alternate exchange, so there's no way to detect routing failures in production.

ig-sinicyn avatar May 11 '20 12:05 ig-sinicyn

up again:)

ig-sinicyn avatar Jun 09 '20 11:06 ig-sinicyn

We have added this to our backlog to investigate the options around this.

EldertGrootenboer avatar Aug 05 '22 21:08 EldertGrootenboer

cc @EldertGrootenboer I want this. How do i up vote it?

mbrimble avatar Jan 13 '23 02:01 mbrimble

cc @EldertGrootenboer I want this. How do i up vote it?

You can upvote on the original request with a thumbs up, or leave a response like you did. If you have any specific input for this request, please also let us know in the comments here.

EldertGrootenboer avatar Jan 31 '23 14:01 EldertGrootenboer

Spent a fair amount of time browsing around for solutions until I landed here. It would be great to have an option to set an "unmatched" subscription or queue that these messages would automatically gets forwarded to, then leave if up to the dev to figure out what to do with them.

cecilphillip avatar Feb 21 '23 03:02 cecilphillip

1000 ups

andyliuliming avatar Jun 13 '23 13:06 andyliuliming

Thank you for your feedback on this item, it helps us in our efforts to continuously prioritize the different requests we get from all our various feedback channels. We have added this feature in our backlog, however we currently don't have an ETA on when development might start on this. For now, to help us give this the right priority, it would be helpful to see others vote and support this feature, as well as explain their scenarios.

EldertGrootenboer avatar Oct 13 '23 19:10 EldertGrootenboer