-
1. Re: Use of wildcards leads to duplicate delivery for queues
ataylor Feb 4, 2013 5:35 AM (in response to bighenry)yes thats correct, any consumer that matches the wildcard will receive the message
-
2. Re: Use of wildcards leads to duplicate delivery for queues
bighenry Feb 4, 2013 6:10 AM (in response to ataylor)Thanks Andy.
So there's no way to do what I wanted to do? I.e. have a message sent to a queue be single delivered if consumers are subsribed with and without wildcards?
-
3. Re: Use of wildcards leads to duplicate delivery for queues
ataylor Feb 4, 2013 6:12 AM (in response to bighenry)I don't really get what you are trying to do, if you dont want messages delivered to multiple queues that match then don't use wildcards, just send to the queue you want the message to go to. Maybe i am misunderstanding what you are doing.
-
4. Re: Use of wildcards leads to duplicate delivery for queues
ataylor Feb 4, 2013 6:20 AM (in response to ataylor)if you post your code it may help me understand
-
5. Re: Use of wildcards leads to duplicate delivery for queues
bighenry Feb 4, 2013 6:23 AM (in response to ataylor)I have a consumer that can process mesages from both both queus (jms.queue.unix.generic and jms.queue.unix.linux) and a consumer that can only process messages from one queue (jms.queue.unix.generic.) Messages are delivered to jms.queue.unix.generic and jms.queue.unix.linux as appropriate. Each message should only be processed once regardless of which consumer processes it.
I'd thought I could implement the consumer that can handle both queues using wildcards, whilst maintainng the single delivery policy. However, from our discussions, I think I'm reaching the conclsion that a policy of single delivery is not mainteined across queues created using wildcards.
The code is a little involved, I'll see if I can knock up a simple test case if that's unclear.
-
6. Re: Use of wildcards leads to duplicate delivery for queues
bighenry Feb 4, 2013 7:58 AM (in response to bighenry)Test case added. Let me know if it's not clear.
-
hornetq-wildcard-test.zip 5.4 KB
-
-
7. Re: Use of wildcards leads to duplicate delivery for queues
bighenry Feb 4, 2013 8:26 AM (in response to bighenry)Having explained this to a colleague I think I've concluded that it's probably my misunderstanding of how wildcards are implemented.
I'd assumed wildcards are used as matchers onto existing queues, with the contracts on the 'source' queues being maintained (specifically single delivery.) However, it seems that wildcards form queues in their own right which have duplicate messages copied to them at message send time.