You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by DanielR <ro...@gmail.com> on 2009/04/23 22:27:16 UTC

How to run a pluggin for only a single queue?

any ideas ?
-- 
View this message in context: http://www.nabble.com/How-to-run-a-pluggin-for-only-a-single-queue--tp23200519p23200519.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: How to run a pluggin for only a single queue?

Posted by Gary Tully <ga...@gmail.com>.
you could look at creating your own destination filter in a destination
interceptor. This is how virtual destinations are implemented. see:
http://activemq.apache.org/virtual-destinations.html and
http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/broker/region/DestinationInterceptor.html
In intercept, it your destination matches, create and return a
DestinationFilter that does what you want just for that destination.


2009/4/24 DanielR <ro...@gmail.com>

>
> I don't want to filter inside my pluggin (is very slow), I want ActiveMQ to
> execute my pluggin only for messages with some specific destination.
> There's
> any way to set up this kind of function inside ActiveMQ's config xml???
>
>
>
> Andreas Gies wrote:
> >
> > Hmmm, I see.
> >
> > There is the possibility to look whether a DestinationPolicy might
> > help you,
> > but I think the easiest way to achieve what you want is with a broker
> > plugin
> > and hook into the preProcessDispatch method.
> >
> > There you can query the Destination and add the property only to the
> > queue
> > you want. If you have a setter method for the queuename(s) you you can
> > keep that
> > part variable.
> >
> > Hope that helps
> > Andreas
> >
> >
> > On Apr 24, 2009, at 3:46 PM, DanielR wrote:
> >
> >>
> >>
> >> My pluggin create a custom property (custom id) in any incomming
> >> message.
> >>
> >> Now I need to do the same but only in one specific queue, so i need
> >> to run
> >> the pluggin only when a message to that queue arrives.
> >>
> >>
> >>
> >> DanielR wrote:
> >>>
> >>> any ideas ?
> >>>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-to-run-a-pluggin-for-only-a-single-queue--tp23200519p23216784.html
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-run-a-pluggin-for-only-a-single-queue--tp23200519p23223994.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source SOA
http://FUSESource.com

Re: How to run a pluggin for only a single queue?

Posted by DanielR <ro...@gmail.com>.
I don't want to filter inside my pluggin (is very slow), I want ActiveMQ to
execute my pluggin only for messages with some specific destination. There's
any way to set up this kind of function inside ActiveMQ's config xml???



Andreas Gies wrote:
> 
> Hmmm, I see.
> 
> There is the possibility to look whether a DestinationPolicy might  
> help you,
> but I think the easiest way to achieve what you want is with a broker  
> plugin
> and hook into the preProcessDispatch method.
> 
> There you can query the Destination and add the property only to the  
> queue
> you want. If you have a setter method for the queuename(s) you you can  
> keep that
> part variable.
> 
> Hope that helps
> Andreas
> 
> 
> On Apr 24, 2009, at 3:46 PM, DanielR wrote:
> 
>>
>>
>> My pluggin create a custom property (custom id) in any incomming  
>> message.
>>
>> Now I need to do the same but only in one specific queue, so i need  
>> to run
>> the pluggin only when a message to that queue arrives.
>>
>>
>>
>> DanielR wrote:
>>>
>>> any ideas ?
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/How-to-run-a-pluggin-for-only-a-single-queue--tp23200519p23216784.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-run-a-pluggin-for-only-a-single-queue--tp23200519p23223994.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: How to run a pluggin for only a single queue?

Posted by Andreas Gies <an...@soa-knowledge.net>.
Hmmm, I see.

There is the possibility to look whether a DestinationPolicy might  
help you,
but I think the easiest way to achieve what you want is with a broker  
plugin
and hook into the preProcessDispatch method.

There you can query the Destination and add the property only to the  
queue
you want. If you have a setter method for the queuename(s) you you can  
keep that
part variable.

Hope that helps
Andreas


On Apr 24, 2009, at 3:46 PM, DanielR wrote:

>
>
> My pluggin create a custom property (custom id) in any incomming  
> message.
>
> Now I need to do the same but only in one specific queue, so i need  
> to run
> the pluggin only when a message to that queue arrives.
>
>
>
> DanielR wrote:
>>
>> any ideas ?
>>
>
> -- 
> View this message in context: http://www.nabble.com/How-to-run-a-pluggin-for-only-a-single-queue--tp23200519p23216784.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: How to run a pluggin for only a single queue?

Posted by DanielR <ro...@gmail.com>.

My pluggin create a custom property (custom id) in any incomming message. 

Now I need to do the same but only in one specific queue, so i need to run
the pluggin only when a message to that queue arrives.



DanielR wrote:
> 
> any ideas ?
> 

-- 
View this message in context: http://www.nabble.com/How-to-run-a-pluggin-for-only-a-single-queue--tp23200519p23216784.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: How to run a pluggin for only a single queue?

Posted by Andreas Gies <ag...@progress.com>.
Well,

my first idea is to ask for a bit more context. What exactly are you  
trying to achieve?
Perhaps I missed one of your earlier messages describing that ?


Best regards
Andreas

On Apr 23, 2009, at 10:27 PM, DanielR wrote:

>
> any ideas ?
> -- 
> View this message in context: http://www.nabble.com/How-to-run-a-pluggin-for-only-a-single-queue--tp23200519p23200519.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

---
Mit freundlichen Grüssen - Kind Regards
Andreas Gies
Principal Consultant
Open Source Center of Competence

Progress Software GmbH
Agrippinawerft 26
50678 Köln

E-Mail      	agies@progress.com
Direct Line 	+49 (0)9953 980349
Mobile      	+49 (0)170 5759611
Skype        	+44 (0)20 3239 2922
Skype       	+353 (0)1 443 4971
Skype       	+1 (0)781 262 0168

http://www.progress.com
http://fusesource.com
http://open-source-adventures.blogspot.com



-------------------------------------------------------
Progress Software GmbH
Sitz der Gesellschaft: Agrippinawerft 26, 50678 Koeln;
Niederlassung: Fuerstenrieder Str. 279, 81377 Muenchen
Amtsgericht Koeln, HRB 15620; 
Geschaeftsfuehrung: David Ireland
-------------------------------------------------------