Package org.apache.activemq.broker.jmx

Examples of org.apache.activemq.broker.jmx.BrokerViewMBean.destroyDurableSubscriber()


        Topic topic = session.createTopic("Test.Topic");
        MessageConsumer consumer = session.createDurableSubscriber(topic, DURABLE_SUB_NAME);
        consumer.close();

        BrokerViewMBean brokerView = getBrokerView(DURABLE_SUB_NAME);
        brokerView.destroyDurableSubscriber(CLIENT_ID, DURABLE_SUB_NAME);
    }

    private BrokerViewMBean getBrokerView(String testDurable) throws MalformedObjectNameException {
        ObjectName brokerName = new ObjectName("org.apache.activemq:type=Broker,brokerName=localhost");
        BrokerViewMBean view = (BrokerViewMBean) brokerService.getManagementContext().newProxyInstance(brokerName, BrokerViewMBean.class, true);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.