BrokerFilter's removeConnection doesn't fill the Throwable error field

Solution Unverified - Updated -

Issue

  • I need to understand if a client is doing a clear disconnect from broker or if the disconnect is caused by a network failure or a transport exception.

    I am planning to use a BrokerFilter to track disconnects. The activeMQ BrokerFilter javadoc says that the error parameter of the removeConnection method should be
    "null if the
    client requested the disconnect or the error that caused the client to disconnect. "

    So I implemented a BrokerFilter and I was expecting to receive a not null Throwable error when the remove connection method was invoked after a network failure
    disconnect and null otherwise.
    But the Throwable error that is passed to removeConnection invocation is null in both cases.
    I debugged the A-MQ code and I can see that tcp transport underline receives an Excepion but doesn't forward it to remove connection filter plugin method.
    Is that the expected behavior or the Throwable error should be not null in this case?

Environment

  • Red Hat JBoss A-MQ
    • 6.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.