Github user mtaylor commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1629#discussion_r148502455
  
    --- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
 ---
    @@ -1621,6 +1621,7 @@ public boolean closeConsumerWithID(final String 
sessionID, final String ID) thro
                    for (ServerConsumer serverConsumer : serverConsumers) {
                       if (serverConsumer.sequentialID() == Long.valueOf(ID)) {
                          serverConsumer.close(true);
    +                     serverConsumer.disconnect();
                          return true;
    --- End diff --
    
    Something to note here.  When the server calls disconnect, it sends a 
DisconnectConsumer packet to the client.  The client processes this packet 
(cleans up some local state) then sends a CloseConsumer packet to the broker.  
Since the broker has already closed the consumer it will log an error message.
    
    Since this is a "ForceClose" style operation, I think it's OK just to 
document that this may happen.  I think an improvement on this is to update the 
client to only send the close consumer packet if the close is called from the 
client API and not via the disconnect consumer packet.


---

Reply via email to