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

WIP: [AMQ-9484] Support exporting kahadb messages from a queue with an offset - Option B #1207

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mattrpav
Copy link
Contributor

No description provided.

@mattrpav mattrpav self-assigned this Apr 23, 2024
Copy link
Contributor

@cshannon cshannon left a comment

Choose a reason for hiding this comment

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

I only took a quick glance but 2 things stand out to me immediately that are issues:

The current PR is using recoverNextMessages() which changes state of the cursor, so this definitely won't work in an online broker without breaking the queue if the intent is for a user to use this to export while a broker is online.
This scans through the index and just skips when you could just use MessageOrderIndex with the order iterator and skip ahead by setting the batch location on the index
This needs a bit more context with use cases to see how this is intended to be used to probably know the best way of doing some of this

@mattrpav
Copy link
Contributor Author

One reason I thought iterating over the index was preferred vs seeking over the index was to skip over and not include any messages in the ackedAndPrepared collection.

    if (ackedAndPrepared != null && ackedAndPrepared.contains(entry.getValue().messageId)) {
        continue;
    }

@mattrpav mattrpav changed the title [AMQ-9484] Support exporting kahadb messages from a queue with an offset [AMQ-9484] Support exporting kahadb messages from a queue with an offset - Option A Apr 24, 2024
@mattrpav mattrpav changed the title [AMQ-9484] Support exporting kahadb messages from a queue with an offset - Option A WIP: [AMQ-9484] Support exporting kahadb messages from a queue with an offset - Option B Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants