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

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

                Author: ASF GitHub Bot
            Created on: 28/Jun/19 15:56
            Start Date: 28/Jun/19 15:56
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on pull request #2731: 
[ARTEMIS-2401]: Implement the Pause method for a Topic
URL: https://github.com/apache/activemq-artemis/pull/2731#discussion_r298653745
 
 

 ##########
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java
 ##########
 @@ -373,6 +372,86 @@ public String sendMessage(final Map<String, String> 
headers,
       return MBeanInfoHelper.getMBeanAttributesInfo(AddressControl.class);
    }
 
+   @Override
+   public void pause() throws Exception {
+      pause(false);
+   }
+
+   @Override
+   public void pause(boolean persist) throws Exception {
+      if (AuditLogger.isEnabled()) {
+         AuditLogger.pause(addressInfo);
+      }
+      checkStarted();
+
+      clearIO();
+      try {
+         if (!addressInfo.isPaused()) {
+            addressInfo.pause();
+            if (persist) {
+               
server.getStorageManager().storeAddressStatus(addressInfo.getId(), 
AddressStatus.PAUSED);
+            }
 
 Review comment:
   Moving the method to AddressInfo would make us introduce serious refactoring 
into Addressinfo
   AddressNfo would on that case have a similar power to what Queue does. 
   
   That is, we would need to bring the Server, StorageManager and other 
functionality that wouldn't belong to AddressInfo, unless we make it similar to 
Queue.. (we could even rename the class to Address)...
   
   Why don't we keep this on AddressController for now.. with a // TODO block 
to move this to AddressInfo, and make proper refactoring on the Address as a 
separate task?
   
   We would need to at least change the contructor to contain the Server (you 
can find everything else after the ACtiveMQServer).
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 269362)
    Time Spent: 6h  (was: 5h 50m)

> Implement the Pause method for a Topic
> --------------------------------------
>
>                 Key: ARTEMIS-2401
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2401
>             Project: ActiveMQ Artemis
>          Issue Type: New Feature
>          Components: Broker
>    Affects Versions: 2.9.0
>            Reporter: Emmanuel Hugonnet
>            Priority: Major
>          Time Spent: 6h
>  Remaining Estimate: 0h
>
> Enable to pause all the consumers of a topic. New subscriptions being 
> registered while the topic is in pause will be paused also.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to