Examples of destroyDurableSubscriber()


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

        assertEquals(1, brokerView.getDurableTopicSubscribers().length);

        LOG.info("Current Durable Topic Subscriptions: " + brokerView.getDurableTopicSubscribers().length);

        try {
            brokerView.destroyDurableSubscriber("subscriber1", "myTopic");
            fail("Expected Exception for Durable consumer is in use");
        } catch(Exception e) {
            LOG.info("Recieved expected exception: " + e.getMessage());
        }
View Full Code Here

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

                return brokerView.getInactiveDurableTopicSubscribers().length == 1;
            }
        }));

        try {
            brokerView.destroyDurableSubscriber("subscriber1", "myTopic");
        } finally {
            producer.close();
            producerConnection.close();
        }
    }
View Full Code Here

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

                return brokerView.getTopics().length == 0;
            }
        }));

        try {
            brokerView.destroyDurableSubscriber("subscriber1", "myTopic");
        } catch(Exception e) {
            fail("Exception not expected when attempting to delete Durable consumer.");
        }

        assertTrue("Should be no durable consumers active or inactive.", Wait.waitFor(new Wait.Condition() {
View Full Code Here

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.