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

ASF GitHub Bot logged work on ARTEMIS-3523:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Oct/21 02:21
            Start Date: 21/Oct/21 02:21
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on a change in pull request 
#3801:
URL: https://github.com/apache/activemq-artemis/pull/3801#discussion_r733271090



##########
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
##########
@@ -4443,7 +4443,7 @@ public void reloadConfigurationFile() throws Exception {
 
    @Override
    public void replay(String address, String target, String filter) throws 
Exception {
-      server.replay(null, null, address, target, filter);
+      server.replay(null, null, this.getAddressInfo(address), target, filter);

Review comment:
       @nbrendah the test should be something fairly simple...
   
   Get the ActiveMQServerControlTest::testReplayWithoutDate and 
testReplaWithDate
   
   copy those into ActiveMQAddressControlTest, and call the new methods that 
you will add:
   
   Add 2 methods to AcctiveMQAddressControl:
   
   ```
   
   
      @Operation(desc = "Makes the broker to read messages from the retention 
folder matching the address and filter.", impact = MBeanOperationInfo.ACTION)
      void replay(
                  @Parameter(name = "target", desc = "Where the replay data 
should be sent") String target,
                  @Parameter(name = "filter", desc = "Filter to apply on 
message selection. Null means everything matching the address") String filter) 
throws Exception;
   
      @Operation(desc = "Makes the broker to read messages from the retention 
folder matching the address and filter.", impact = MBeanOperationInfo.ACTION)
      void replay(@Parameter(name = "startScanDate", desc = "Start date where 
we will start scanning for journals to replay. Format YYYYMMDDHHMMSS") String 
startScan,
                  @Parameter(name = "endScanDate", desc = "Finish date where we 
will stop scannning for journals to replay. Format YYYYMMDDHHMMSS") String 
endScan,
                  @Parameter(name = "target", desc = "Where the replay data 
should be sent") String target,
                  @Parameter(name = "filter", desc = "Filter to apply on 
message selection. Null means everything matching the address") String filter) 
throws Exception;
   
   ```
   
   
   notice I only removed the address, as that will be delegated through the 
this.addressName
   
   
   With the two copied & pasted tests from ActiveMQServerControl into 
ActiveMQAddressControlTest (select a random address for the test), you should 
be able to finish the task.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

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

> Expose replay through AddressControl
> ------------------------------------
>
>                 Key: ARTEMIS-3523
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3523
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Clebert Suconic
>            Priority: Major
>              Labels: easy
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Currently there is a method replay on ActiveMQServer with the following 
> signature:
> replay(address, .....)
> it should be a lot easier for our users to implement a method replay on the 
> ActiveMQServerControl
> such method should just call server.replay(this.address, .....)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to