This content has been marked as final.
Show 3 replies
-
1. Re: Questio on setting group association in delivery algo
jmesnil Nov 13, 2009 4:22 AM (in response to timfox)yes, it'd be simpler to set the consumer after the message is handled.
besides, the current code is dead wrong:else if (status == HandleStatus.NO_MATCH) { // if consumer filter reject the message make sure it won't be assigned the messag e group if (groupID != null) { groups.remove(consumer); } }
groups.remove() must be called with the key (groupID), not with the value (consumer).
As it is written now, it is possible to keep a consumer with a non-matching filter to a group! -
2. Re: Questio on setting group association in delivery algo
timfox Nov 13, 2009 4:37 AM (in response to timfox)Good catch.
Another thing I don't understand is this:if (groupConsumer != null && groupConsumer != consumer) { continue; }
I don't see how this code would ever be executed since the group association is always protected by a synchronized lock. -
3. Re: Questio on setting group association in delivery algo
timfox Nov 13, 2009 4:40 AM (in response to timfox)Actually, scratch that. The code is done before handle for a purpose, otherwise the wrong consumer could get the message.