2 small questions on wildcards usage.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

2 small questions on wildcards usage.

Eric-AWL
Hi

Are wildcards limited to a consumer usage, or can they be used by producers ?

I explain

Site A : queue.A
Site B : queue.B

Is it possible to create producers for queue.A (only on site A), queue.B (only on site B) and queue.* (the 2 sites) ?

Is it possible to have   A.queue, B.queue, and consume or produce on "*.queue" ?

Thank you for your answers
Eric-AWL
Reply | Threaded
Open this post in threaded view
|

Re: 2 small questions on wildcards usage.

rajdavies

On 31 Jul 2009, at 08:14, Eric-AWL wrote:

>
> Hi
>
> Are wildcards limited to a consumer usage, or can they be used by  
> producers
> ?
>
> I explain
>
> Site A : queue.A
> Site B : queue.B
>
> Is it possible to create producers for queue.A (only on site A),  
> queue.B
> (only on site B) and queue.* (the 2 sites) ?
>
> Is it possible to have   A.queue, B.queue, and consume or produce on
> "*.queue" ?
>
> Thank you for your answers
> Eric-AWL
> --
> View this message in context: http://www.nabble.com/2-small-questions-on-wildcards-usage.-tp24752155p24752155.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

ActiveMQ only supports wildcard subscriptions for Consumers. You can  
achieve the same for your case by publishing a message with a  
composite destination - see http://activemq.apache.org/composite-destinations.html
e.g. you can send a message with the destination - "queue.A,queueB"

cheers,

Rob

Rob Davies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/




Reply | Threaded
Open this post in threaded view
|

Re: 2 small questions on wildcards usage.

Eric-AWL
Thank you for your very quick answer !

Eric-AWL

rajdavies wrote
On 31 Jul 2009, at 08:14, Eric-AWL wrote:

>
> Hi
>
> Are wildcards limited to a consumer usage, or can they be used by  
> producers
> ?
>
> I explain
>
> Site A : queue.A
> Site B : queue.B
>
> Is it possible to create producers for queue.A (only on site A),  
> queue.B
> (only on site B) and queue.* (the 2 sites) ?
>
> Is it possible to have   A.queue, B.queue, and consume or produce on
> "*.queue" ?
>
> Thank you for your answers
> Eric-AWL
> --
> View this message in context: http://www.nabble.com/2-small-questions-on-wildcards-usage.-tp24752155p24752155.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

ActiveMQ only supports wildcard subscriptions for Consumers. You can  
achieve the same for your case by publishing a message with a  
composite destination - see http://activemq.apache.org/composite-destinations.html
e.g. you can send a message with the destination - "queue.A,queueB"

cheers,

Rob

Rob Davies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/



Reply | Threaded
Open this post in threaded view
|

2 small questions on wildcards usage (MORE)

Eric-AWL
Finally, I understood that composite destination, is not the good answer.

When a producer uses composite destinations, it produces several messages, one for each destination.

What I wanted, is that the producer decides to produce for A.MyQueue (only one "site A" MyQueue consumer will be able to consume the message), or B.MyQueue (only one "site B" MyQueue consumer will be able to consume the message), or for *.MyQueue (only one MyQueue consumer, on site A or site B, will be able to consume the message).


The other question is : Is it possible to use wildcards at the beginning of the destination name, or is it always at the end ?

Eric-AWL
Reply | Threaded
Open this post in threaded view
|

Re: 2 small questions on wildcards usage (MORE)

rajdavies

On 31 Jul 2009, at 09:22, Eric-AWL wrote:

>
> Finally, I understood that composite destination, is not the good  
> answer.
>
> When a producer uses composite destinations, it produces several  
> messages,
> one for each destination.
>
> What I wanted, is that the producer decides to produce for A.MyQueue  
> (only
> one "site A" MyQueue consumer will be able to consume the message), or
> B.MyQueue (only one "site B" MyQueue consumer will be able to  
> consume the
> message), or for *.MyQueue (only one MyQueue consumer, on site A or  
> site B,
> will be able to consume the message).
In which case - as wildcards for producers isn't supported, you'll  
have to use another consumer on SiteA and SiteB - to subscribe to  
another shared queue - eg. "site.All"
>
>
> The other question is : Is it possible to use wildcards at the  
> beginning of
> the destination name, or is it always at the end ?
You can use a wild card where you like - see http://activemq.apache.org/wildcards.html
so you can subscribe to *.SITE and get messages for A.SITE and B.SITE
>
> Eric-AWL
>
> --
> View this message in context: http://www.nabble.com/2-small-questions-on-wildcards-usage.-tp24752155p24752803.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



cheers,

Rob

Rob Davies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/