[jira] [Work logged] (ARTEMIS-3436) Expose Retention as a JMX Operation replay

2021-08-24 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 24/Aug/21 23:07
Start Date: 24/Aug/21 23:07
Worklog Time Spent: 10m 
  Work Description: asfgit closed pull request #3704:
URL: https://github.com/apache/activemq-artemis/pull/3704


   


-- 
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: 641370)
Time Spent: 1.5h  (was: 1h 20m)

> Expose Retention as a JMX Operation replay
> --
>
> Key: ARTEMIS-3436
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3436
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> This should expose the journal retention as an operation replay on the JMX 
> Console.



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


[jira] [Work logged] (ARTEMIS-3436) Expose Retention as a JMX Operation replay

2021-08-24 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 24/Aug/21 22:48
Start Date: 24/Aug/21 22:48
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on pull request #3704:
URL: https://github.com/apache/activemq-artemis/pull/3704#issuecomment-905026397


   @michaelandrepearce it could possibly be done I guess. although the replay 
operation is not meant to be multi-threaded... (as it will require reading a 
lot of IO files).
   
   it would be ok as long it's not something heavily used (like too many 
requests per minute or something like that).


-- 
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: 641365)
Time Spent: 1h 20m  (was: 1h 10m)

> Expose Retention as a JMX Operation replay
> --
>
> Key: ARTEMIS-3436
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3436
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> This should expose the journal retention as an operation replay on the JMX 
> Console.



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


[jira] [Work logged] (ARTEMIS-3436) Expose Retention as a JMX Operation replay

2021-08-24 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 24/Aug/21 20:57
Start Date: 24/Aug/21 20:57
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #3704:
URL: https://github.com/apache/activemq-artemis/pull/3704#issuecomment-904968506


   I was talking re retroactive address.


-- 
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: 641329)
Time Spent: 1h 10m  (was: 1h)

> Expose Retention as a JMX Operation replay
> --
>
> Key: ARTEMIS-3436
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3436
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> This should expose the journal retention as an operation replay on the JMX 
> Console.



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


[jira] [Work logged] (ARTEMIS-3436) Expose Retention as a JMX Operation replay

2021-08-24 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 24/Aug/21 20:53
Start Date: 24/Aug/21 20:53
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce edited a comment on pull request 
#3704:
URL: https://github.com/apache/activemq-artemis/pull/3704#issuecomment-904965744


   +1 
   
   One quick thought could this also replace/compliment the side queue replay 
on subscription feature implemented last year as now wouldnt need to have a 
queue to the side can just use the journal . Not for this PR, but a general 
thought for subsequent later prs / enhancement this feature could enable


-- 
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: 641328)
Time Spent: 1h  (was: 50m)

> Expose Retention as a JMX Operation replay
> --
>
> Key: ARTEMIS-3436
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3436
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> This should expose the journal retention as an operation replay on the JMX 
> Console.



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


[jira] [Work logged] (ARTEMIS-3436) Expose Retention as a JMX Operation replay

2021-08-24 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 24/Aug/21 20:52
Start Date: 24/Aug/21 20:52
Worklog Time Spent: 10m 
  Work Description: michaelandrepearce commented on pull request #3704:
URL: https://github.com/apache/activemq-artemis/pull/3704#issuecomment-904965744


   +1 
   
   One quick thought could this also replace/compliment the side queue replay 
on subscription feature implemented last year as now wouldnt need to have a 
queue to the side can just use the journal


-- 
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: 641327)
Time Spent: 50m  (was: 40m)

> Expose Retention as a JMX Operation replay
> --
>
> Key: ARTEMIS-3436
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3436
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> This should expose the journal retention as an operation replay on the JMX 
> Console.



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


[jira] [Work logged] (ARTEMIS-3436) Expose Retention as a JMX Operation replay

2021-08-20 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 20/Aug/21 18:58
Start Date: 20/Aug/21 18:58
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on a change in pull request 
#3704:
URL: https://github.com/apache/activemq-artemis/pull/3704#discussion_r693157727



##
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
##
@@ -480,8 +481,14 @@ public NetworkHealthCheck getNetworkHealthCheck() {
   return networkHealthCheck;
}
 
-   // life-cycle methods
-   // 
+
+   @Override
+   public void replay(Date start, Date end, String address, String target, 
String filter) throws Exception {
+  if (replayManager == null) {
+ throw new NullPointerException("replayManager not set");

Review comment:
   I will use the logger...




-- 
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: 640351)
Time Spent: 40m  (was: 0.5h)

> Expose Retention as a JMX Operation replay
> --
>
> Key: ARTEMIS-3436
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3436
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> This should expose the journal retention as an operation replay on the JMX 
> Console.



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


[jira] [Work logged] (ARTEMIS-3436) Expose Retention as a JMX Operation replay

2021-08-20 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 20/Aug/21 18:57
Start Date: 20/Aug/21 18:57
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on a change in pull request 
#3704:
URL: https://github.com/apache/activemq-artemis/pull/3704#discussion_r693157255



##
File path: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
##
@@ -4048,6 +4053,109 @@ public void testResetUser() throws Exception {
   }
}
 
+   @Test
+   public void testReplayWithoutDate() throws Exception {
+  testReplaySimple(false);
+   }
+
+   @Test
+   public void testReplayWithDate() throws Exception {
+  testReplaySimple(true);
+   }
+
+   private void testReplaySimple(boolean useDate) throws Exception {
+  ActiveMQServerControl serverControl = createManagementControl();
+  String queue = "testQueue" + RandomUtil.randomString();
+  server.addAddressInfo(new 
AddressInfo(queue).addRoutingType(RoutingType.ANYCAST));
+  server.createQueue(new 
QueueConfiguration(queue).setRoutingType(RoutingType.ANYCAST).setAddress(queue));
+
+  ConnectionFactory factory = CFUtil.createConnectionFactory("core", 
"tcp://localhost:61616");
+  try (Connection connection = factory.createConnection()) {
+ Session session = connection.createSession(false, 
Session.AUTO_ACKNOWLEDGE);
+ javax.jms.Queue jmsQueue = session.createQueue(queue);
+ MessageProducer producer = session.createProducer(jmsQueue);
+ producer.send(session.createTextMessage("before"));
+
+ connection.start();
+ MessageConsumer consumer = session.createConsumer(jmsQueue);
+ Assert.assertNotNull(consumer.receive(5000));
+ Assert.assertNull(consumer.receiveNoWait());
+
+ serverControl.replay(queue, queue, null);
+ Assert.assertNotNull(consumer.receive(5000));
+ Assert.assertNull(consumer.receiveNoWait());
+
+ if (useDate) {
+serverControl.replay("dontexist", "dontexist", null); // just to 
force a move next file, and copy stuff into place
+SimpleDateFormat format = new SimpleDateFormat("MMddHHmmss");
+Thread.sleep(1000); // waiting a second just to have the timestamp 
change
+String dateEnd = format.format(new Date());
+Thread.sleep(1000); // waiting a second just to have the timestamp 
change
+System.out.println("Date End " + dateEnd);

Review comment:
   remove this...




-- 
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: 640350)
Time Spent: 0.5h  (was: 20m)

> Expose Retention as a JMX Operation replay
> --
>
> Key: ARTEMIS-3436
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3436
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> This should expose the journal retention as an operation replay on the JMX 
> Console.



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


[jira] [Work logged] (ARTEMIS-3436) Expose Retention as a JMX Operation replay

2021-08-20 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 20/Aug/21 18:57
Start Date: 20/Aug/21 18:57
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on a change in pull request 
#3704:
URL: https://github.com/apache/activemq-artemis/pull/3704#discussion_r693156951



##
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
##
@@ -4438,5 +4440,24 @@ private PropertiesLoginModuleConfigurator 
getPropertiesLoginModuleConfigurator()
public void reloadConfigurationFile() throws Exception {
   server.reloadConfigurationFile();
}
+
+   @Override
+   public void replay(String address, String target, String filter) throws 
Exception {
+  server.replay(null, null, address, target, filter);
+   }
+
+   @Override
+   public void replay(String startScan, String endScan, String address, String 
target, String filter) throws Exception {
+
+  SimpleDateFormat format = ReplayManager.newRetentionSimpleDateFormat();
+
+  Date startScanDate = format.parse(startScan);
+  Date endScanDate = format.parse(endScan);
+
+  System.out.println("Start date :: " + startScanDate + " formatted as " + 
format.format(startScanDate));

Review comment:
   forgot some system.out here.. I will remove it.




-- 
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: 640349)
Time Spent: 20m  (was: 10m)

> Expose Retention as a JMX Operation replay
> --
>
> Key: ARTEMIS-3436
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3436
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> This should expose the journal retention as an operation replay on the JMX 
> Console.



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


[jira] [Work logged] (ARTEMIS-3436) Expose Retention as a JMX Operation replay

2021-08-20 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 20/Aug/21 18:56
Start Date: 20/Aug/21 18:56
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on a change in pull request 
#3704:
URL: https://github.com/apache/activemq-artemis/pull/3704#discussion_r693156764



##
File path: 
artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java
##
@@ -2891,6 +2891,21 @@ public void forceMoveNextFile() throws Exception {
   }
}
 
+   @Override
+   public void forceBackup() throws Exception {

Review comment:
   Doing my own review here, I'm going to send a parameter to the wait 
latch...




-- 
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: 640348)
Remaining Estimate: 0h
Time Spent: 10m

> Expose Retention as a JMX Operation replay
> --
>
> Key: ARTEMIS-3436
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3436
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This should expose the journal retention as an operation replay on the JMX 
> Console.



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