BrokerFilter how to respond to client with Error Message
I have implemented a BrokerFilter which Authenticates a connection on
"addConnection" and Authorises on "addConsumer".
This works but my question is about error handling - "addConnection" returns
a void and throws Exception. If I raise an exception (with a message) the
exception not only gets written to the log but also returns full stacktrace
to the client.
Is there any way to only return the message? - returning the stacktrace
doesn't feel right for a security plugin. At the moment I am catching
Exceptions within the function, logging them then setting
"context.setDontSendResponse(true);" so the client doesn't get any detail on
I would like my client to be able to handle the errors differently - e.g.
"Token Expired" would be different from ActiveMQ not being available to the