I need to resend messages from the dead letter queue to the topic, but with specific ApplicationProperties. These are then used in filters so that the messages are only processed in a specific subscription.
@Carael What do you think? I would implement this.
Activity
Carael commentedon Apr 24, 2024
Yes that would be nice. I looked briefly into the code and it doesn't look like there is a way in the api to create a receiver with a filter. Which means you would have to create a receiver that iterates over all messages, check the application property by filter, if matches send the message and complete, if not skip and go further. Similair code can be found in the MessageService.DeleteMessage() - it iterates over messages and completes it by sequence number.
Interface wise you could add this as optional filter in the Resend dead letter messages dialog window.
Btw. I'm in the middle of writing the Export functionality. This may as well help you - you could export the messages to file system, filter out the files by your criteria and then import (import is already implemented). The branch on which I last worked on this is carael/export-messages
anweihe commentedon Apr 24, 2024
I meant only to specify ApplicationProperties when resending the messages. The filter is automatically applied by the service bus via a rule, which has to be defined beforehand.
Carael commentedon May 7, 2024
Ok sure, that's also an option. Bring a PR and we will discuss. Will be happy to merge it back to master:)