Search code examples
javaactivemq-classicnmsapache-nms

Failover transport protocol can't handle consumercontrol messages


As part of AbortSlowConsumerStrategy, Active MQ sends down a command to close the consumer if it finds a consumer to be slow but on the consumer/client side, failover transport protocol implementation does not seem to handle this Consumercontrol command, it fails saying, "ERROR: Unknown Command - ConsumerControl.."; Is there a better way to abort the consumer instead of receiving errors?

Please note that consumer is in DotNet using Apache.NMS library.


Solution

  • Sounds like you are using an old client library which did not support consumer control, newer releases should now support this feature. This was fixed in 5.12.0 as a result of this JIRA issue.

    Use an up to date client release (latest is 5.14.4) and you should not have a problem.

    For some of the other client libraries where these fixes haven't been made your only alternative is to configure the abort policy to just terminate the connection of the client that has the slow consumer. Some info info in this blog post and the API docs.