ServiceBusExplorer icon indicating copy to clipboard operation
ServiceBusExplorer copied to clipboard

Feature suggestion: Message content filter

Open phatcher opened this issue 3 years ago • 8 comments

I needed to resubmit some messages from the DLQ with a particular data value, but the filtering on ServiceBus queues/subscriptions uses the ServiceBus filter which requires that the properties are in the header.

I've implemented a FilteredBrokeredMessageInspector which does a dumb comparison of a filter value against the message contents - this could be improved you want to adopt such a thing.

phatcher avatar Jun 29 '22 16:06 phatcher

@phatcher sounds like an interesting feature to improve the experience. Would you like to submit a PR? Would be nice if you could add a few screenshots or a short video how it would work.

SeanFeldman avatar Jun 29 '22 17:06 SeanFeldman

It would be great if we could replace the filtering that is built-in in the old SDK with your implementation @phatcher since there is no such functionality in the latest SDK. At least last time I checked.

ErikMogensen avatar Jun 29 '22 19:06 ErikMogensen

I've issued a PR for my current progress but it's not ready for merging yet - see the PR for details

UI looks as follows...

image

I extended ReceiveModeForm to expose a Filter property and then implemented the filtering as a IBrokeredMessageInspector

Works for queues/dlq in both batch/single message mode but there's some open questions/issues...

  1. Works on Queues/DLQ
  2. Simple string.Contains on message content a. Option for regex? a. Should we apply before/after specified IBrokeredMessageInspector, option? a. Want to know how many accepted/rejected
  3. Refactored LogBrokeredMessageInspector to extract common code
  4. Introduced factory method for IBrokeredMessageInspector, extracts common code
  5. Also apply to delete or presume we are already filtered?

Feel free to add to the list

Solved an issue for me and a bit of nostalgia - don't think I've written Windows Forms code for over 10 years :smile:

phatcher avatar Jun 29 '22 22:06 phatcher

We should probably move the discussion about implementation details to the PR #660

SeanFeldman avatar Jun 30 '22 04:06 SeanFeldman

What's the status here? I'd love to see the possibility to filter messages based on the content.

DerStimmler avatar Aug 17 '22 14:08 DerStimmler

@DerStimmler see #600.

SeanFeldman avatar Aug 17 '22 14:08 SeanFeldman

@SeanFeldman I guess you mean #660. @phatcher are you making progress or do you need support?

DerStimmler avatar Aug 17 '22 15:08 DerStimmler

I would contribute as well if you need assistance for bringing it to production

Uli-Armbruster avatar Aug 18 '22 07:08 Uli-Armbruster