Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add selective delete to Transfer deadletter subqueues and fix the context menus for the Transfer Deadletter grid view #768

Conversation

ErikMogensen
Copy link
Collaborator

Before this PR the context menu when selecting a single Transfer DLQ message looks like this:
image

and when selecting multiple messages it looks like this:
image

This PR removes the separate handling of the Transfer Deadletter context menus, they are now the same as for the Deadletter context menus. A lot of the code for handling messages in these subqueues is now shared.

Also added the feature to selectively delete Transfer deadletter messages.

The above is only added for queues and not for subscriptions as the transfer deadletter support is a bit mysterious for subscriptions.

Copy link

@sean-feldman-sh sean-feldman-sh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments. Something is not sitting right with me about SubqueueType but not a blocker.

public enum SubqueueType
{
NotSet,
NotASubqueue,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PrimaryQueue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@@ -115,6 +117,16 @@ public partial class MessageForm : Form
};
#endregion

#region Public Enums
public enum SubqueueType

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QueueType?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

stopwatch.Start();

if (chkRemove.Checked)
{
var messageHandler = CreateDeadLetterMessageHandler();

var result = await messageHandler.MoveMessages(messageSender,
sequenceNumbers, outboundMessages);
sequenceNumbers,
transferDLQ: subqueueType == SubqueueType.TransferDeadletter ? true: false,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ternary condition not necessary here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

Copy link
Collaborator

@SeanFeldman SeanFeldman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with correct account 😄

@ErikMogensen
Copy link
Collaborator Author

Approved twice, this must be a fantastic PR 😆

@SeanFeldman
Copy link
Collaborator

Approved twice, this must be a fantastic PR 😆

If I wouldn't approve with the correct account, you'd be blocked 😉

@ErikMogensen
Copy link
Collaborator Author

If I wouldn't approve with the correct account, you'd be blocked 😉

I know. I just couldn't resist 😄

@ErikMogensen ErikMogensen merged commit 27ba8a6 into paolosalvatori:main Feb 13, 2024
2 checks passed
@ErikMogensen ErikMogensen deleted the FixTransferDeadletterQueueGridviewMenus branch February 13, 2024 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants