[ 
https://issues.apache.org/jira/browse/AMQ-9646?focusedWorklogId=954409&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-954409
 ]

ASF GitHub Bot logged work on AMQ-9646:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Jan/25 21:01
            Start Date: 27/Jan/25 21:01
    Worklog Time Spent: 10m 
      Work Description: mattrpav commented on code in PR #1377:
URL: https://github.com/apache/activemq/pull/1377#discussion_r1931182555


##########
activemq-console/src/main/java/org/apache/activemq/console/command/store/StoreBackup.java:
##########
@@ -178,7 +194,19 @@ public boolean recoverMessage(Message message) throws 
IOException {
                         return true;
                     }
                 };
-                if(offset != null) {
+                if(startMsgId != null || endMsgId != null) {
+                    System.out.println("Backing up from startMsgId: " + 
startMsgId + " to endMsgId: " + endMsgId);
+                    queue.recoverNextMessages(startMsgId, endMsgId, (count != 
null ? count : Integer.MAX_VALUE), queueRecoveryListener, true);
+                } else if(indexesList != null) {
+                    System.out.println("Backing up using indexes count: " + 
indexesList.size());
+                    for(int idx : indexesList) {
+                        if(idx < 0) {

Review Comment:
   The cause would be bad user input. I'm good with making the change to throw 
exception.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 954409)
    Time Spent: 1h 50m  (was: 1h 40m)

> 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: 1h 50m
>  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


Reply via email to