[
https://issues.apache.org/jira/browse/AMQ-9646?focusedWorklogId=956132&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-956132
]
ASF GitHub Bot logged work on AMQ-9646:
---------------------------------------
Author: ASF GitHub Bot
Created on: 07/Feb/25 21:06
Start Date: 07/Feb/25 21:06
Worklog Time Spent: 10m
Work Description: mattrpav commented on code in PR #1377:
URL: https://github.com/apache/activemq/pull/1377#discussion_r1947194459
##########
activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java:
##########
@@ -733,35 +734,56 @@ public void execute(Transaction tx) throws Exception {
}
@Override
- public void recoverNextMessages(final int offset, final int
maxReturned, final MessageRecoveryListener listener) throws Exception {
+ public void recoverMessages(final MessageRecoveryContext
messageRecoveryContext) throws Exception {
indexLock.writeLock().lock();
try {
pageFile.tx().execute(new Transaction.Closure<Exception>() {
@Override
public void execute(Transaction tx) throws Exception {
StoredDestination sd = getStoredDestination(dest, tx);
+
+ Long startSequenceOffset = null;
+ Long endSequenceOffset = null;
+
+ if(messageRecoveryContext.getStartMessageId() != null
&& !messageRecoveryContext.getStartMessageId().isBlank()) {
+ startSequenceOffset = sd.messageIdIndex.get(tx,
messageRecoveryContext.getStartMessageId());
+ }
+
+ if(startSequenceOffset == null) {
+ startSequenceOffset =
messageRecoveryContext.getOffset();
+ }
+
+ if(messageRecoveryContext.getEndMessageId() != null &&
!messageRecoveryContext.getEndMessageId().isBlank()) {
Review Comment:
completed
##########
activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java:
##########
@@ -733,35 +734,56 @@ public void execute(Transaction tx) throws Exception {
}
@Override
- public void recoverNextMessages(final int offset, final int
maxReturned, final MessageRecoveryListener listener) throws Exception {
+ public void recoverMessages(final MessageRecoveryContext
messageRecoveryContext) throws Exception {
indexLock.writeLock().lock();
try {
pageFile.tx().execute(new Transaction.Closure<Exception>() {
@Override
public void execute(Transaction tx) throws Exception {
StoredDestination sd = getStoredDestination(dest, tx);
+
+ Long startSequenceOffset = null;
+ Long endSequenceOffset = null;
+
+ if(messageRecoveryContext.getStartMessageId() != null
&& !messageRecoveryContext.getStartMessageId().isBlank()) {
+ startSequenceOffset = sd.messageIdIndex.get(tx,
messageRecoveryContext.getStartMessageId());
+ }
+
+ if(startSequenceOffset == null) {
Review Comment:
completd
Issue Time Tracking
-------------------
Worklog Id: (was: 956132)
Time Spent: 4h (was: 3h 50m)
> Support selecting specific messages for command line backup
> -----------------------------------------------------------
>
> Key: AMQ-9646
> URL: https://issues.apache.org/jira/browse/AMQ-9646
> Project: ActiveMQ Classic
> Issue Type: Improvement
> Reporter: Matt Pavlovich
> Assignee: Matt Pavlovich
> Priority: Minor
> Fix For: 6.2.0, 5.19.0
>
> Time Spent: 4h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact