activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: How to restrict queue deletion or purging in ActiveMQ 5.11.0?
Date Sun, 04 Dec 2016 15:53:10 GMT
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" <debanjanochanda@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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message