mruan <ming.r...@ab-ovo.com> writes: > What I want is to modify some code (e.g. built-in checks) in the function > f() so that when the second case happens, the function will NOT create the > wrong queue. > > I hope that I am now clear to you.
You will have to precreate the destinations (http://activemq.apache.org/configure-startup-destinations.html) and then set up security with anonymous user enabled and then disallow creation of new destinations for the anonymous (admin right) (http://activemq.apache.org/security.html) something like this <broker ... [...] <destinations> <queue physicalName="queueA" /> <topic physicalName="topicA" /> [...] </broker> <plugins> [...] <simpleAuthenticationPlugin anonymousAccessAllowed="true"> <users> <authenticationUser username="system" password="manager" groups="admin"/> </users> </simpleAuthenticationPlugin> <authorizationPlugin> <map> <authorizationMap> <authorizationEntries> <authorizationEntry queue=">" read="anonymous,admin" write="anonymous,admin" admin="admin" /> <authorizationEntry topic=">" read="anonymous,admin" write="anonymous,admin" admin="admin" /> </authorizationEntries> </authorizationMap> </map> </authorizationPlugin> [...] </plugins>