You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Tim Bain <tb...@alumni.duke.edu> on 2016/12/04 15:53:10 UTC
Re: How to restrict queue deletion or purging in ActiveMQ 5.11.0?
If you submit an enhancement request in JIRA, this operation could be
controlled by the admin role in a future version.
On Nov 16, 2016 9:54 PM, "Moron" <de...@gmail.com> wrote:
> I am wondering how could we restrict users from deleting a queue in
> Activemq.
> I am using simpleAuthenticationPlugin and authorizationPlugin for
> configuring user and access management.
>
> PFA my activemq.xml
> <http://activemq.2283324.n4.nabble.com/file/n4719273/activemq.xml> file.
>
> I am looking for a configuration which stops users to delete and purge any
> queue. Sample code which I am using to delete a queue:
>
> public static void deleteDestinationQueue(String username, String password,
> String destName) throws JMSException{
> ConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory(ActiveMQConnection.DEFAULT_BROKER_URL);
> ActiveMQConnection connection = null;
> try {
> connection = (ActiveMQConnection)
> connectionFactory.createConnection(username,password);
> ActiveMQDestination destination =
> ActiveMQDestination.createDestination(destName,
> ActiveMQDestination.QUEUE_TYPE);
> connection.destroyDestination(destination);
> } catch (JMSException e) {
> e.printStackTrace();
> } finally{
> connection.close();
> }
> }
>
> I am calling this function as:
>
> deleteDestinationQueue("user1","pwd1", "QUEUEB");
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/How-to-restrict-queue-deletion-or-purging-in-
> ActiveMQ-5-11-0-tp4719273.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>