[
https://issues.apache.org/jira/browse/ARTEMIS-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16235567#comment-16235567
]
ASF GitHub Bot commented on ARTEMIS-1486:
-----------------------------------------
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.
> Core client should be notified if consumer is closed on broker side
> -------------------------------------------------------------------
>
> Key: ARTEMIS-1486
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1486
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Stanislav Knot
> Priority: Major
>
> If consumer is closed on broker using e.g. Hawtio console, client connected
> as that consumer (representation of broker resource) should be notified about
> that fact and react to that. It doesn't seem to react. If consumer is closed,
> as a result of not being notified, client hangs in the air and cannot receive
> messages.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)