Let me sum up, since it seems this is a very common misunderstanding - Clebert made the
same mistake the other day. I've explained it before on this forum but I'll
explain it again....
Why do we have "allowable addresses"? (A.K.A "destinations" in
AddressManager)
In an ideal world, we wouldn't have them at all. We would just bind queues to
addresses, and route messages to addresses, so we'd just need mappings of addresses to
queues.
That's the way core works when checkAllowable is set to false. In that case we
don't care about allowable destinations - they're never populated or queried - we
just bind queues to addresses and route them.
The reason we introduced allowable addresses is because of a JMS difficulty. In JMS it is
illegal to send a message to a topic which doesn't "exist".
But in core, how do we know if a topic "exists" if it has no subscribers? A
topic with no subscribers in core is indistinguishable from no topic at all since
we're just binding queues to address.
So.... to allow JMS to work correctly we needed some way in core to denote a topic that
has been "deployed" but has no subscribers. Hence the allowable addresses.
If you set checkAllowable = true, then the post office will only allow routing to
addresses in the set of allowable destinations. So, for JMS we make sure we call add
destination for each JMS queue or topic deployed.
But the important point here is there is no guarantee check allowable = true. If
checkAllowable = false then probably the list of allowable destinations is empty even
though there are many queues, so you can't rely on it.
Hope that's clearer.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199751#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...