activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From moreno9000 <>
Subject How to "activate" an interceptor
Date Mon, 23 Nov 2009 14:15:02 GMT

I'd like to write an interceptor that controls the size of a queue
(number of messages in the queue) and throws an exception
if the queue has reached a predefined limit.

I wrote two classes.
The first one (ItlPlugin class) implements BrokerPlugin.
The second one (ItlBroker class) extends BrokerFilter.
In AMQ XML conf file I declare to use ItlPLugin.

Everything is ok (plugin is installed during AMQ startup), 
but now I don't know how to "activate" the interceptor
(probably, I haven't understood interceptor's logic :-().

Do I need to override one of BrokerFilter's methods
in order to control queue size and throws the exception?

This method is "automatically" called when a message
is sent to AMQ or a client (producer) has to explicitly
call it?

I apologize for this newbie's question.
Thanks in advance

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message