You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by jonfrias <jo...@tecnalia.com> on 2013/04/22 15:48:58 UTC

ActiveMQ events to intercept a message in a topic

Hi all,

I am writing because I'm implementing my own activemq-broker which
implements some feautures extra over the default version.

I'm implementing the encryptation feature to all the messages which are sent
within servicemix. To do this:

1 - I have overrided the method "preProcessDispatch". In this method I can
intercept the messages before they are sent and I encrypt the body of the
messages.

2 - I need to intercept now the messages before they are consumed by the
consumers to decrypt the body of the messages. I have tried with these
methods:
  * public void messageConsumed(ConnectionContext context,MessageReference
messageReference)
  * public void messageDelivered(ConnectionContext context,MessageReference
messageReference)

but none of them worked. I even try to write some text in the log to verify
if these methods are executed and apparently they are not.

Can anybody tell me which method I should use? Or what am I doing wrong if
the methods I have tested are correct?

Thanks a lot in advance.

Best regards,

Jon 



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-events-to-intercept-a-message-in-a-topic-tp4666118.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.