Package org.apache.activemq.broker

Examples of org.apache.activemq.broker.BrokerPluginSupport


    public void testPoolingNConsumesAfterReconnect() throws Exception {
        broker = createBroker(true);
        setDefaultPersistenceAdapter(broker);

        broker.setPlugins(new BrokerPlugin[]{
                new BrokerPluginSupport() {
                    int count = 0;

                    @Override
                    public void removeConsumer(ConnectionContext context, final ConsumerInfo info) throws Exception {
                        if (count++ == 1) {
View Full Code Here


    public void doTestFailoverConsumerDups(final boolean watchTopicAdvisories) throws Exception {

        broker = createBroker(true);

        broker.setPlugins(new BrokerPlugin[] {
                new BrokerPluginSupport() {
                    @Override
                    public void commitTransaction(ConnectionContext context,
                            TransactionId xid, boolean onePhase) throws Exception {
                        // so commit will hang as if reply is lost
                        context.setDontSendReponse(true);
View Full Code Here

    @SuppressWarnings("unchecked")
    public void doTestFailoverConsumerOutstandingSendTx(final boolean doActualBrokerCommit) throws Exception {
        final boolean watchTopicAdvisories = true;
        broker = createBroker(true);

        broker.setPlugins(new BrokerPlugin[] { new BrokerPluginSupport() {
            @Override
            public void commitTransaction(ConnectionContext context,
                    TransactionId xid, boolean onePhase) throws Exception {
                // from the consumer perspective whether the commit completed on the broker or
                // not is irrelevant, the transaction is still in doubt in the absence of a reply
View Full Code Here

        final int maxConsumers = 2;
        broker = createBroker(true);

        broker.setPlugins(new BrokerPlugin[] {
                new BrokerPluginSupport() {
                    int consumerCount;

                    // broker is killed on x create consumer
                    @Override
                    public Subscription addConsumer(ConnectionContext context,
View Full Code Here

        final int maxConsumers = 4;
        broker = createBroker(true);

        broker.setPlugins(new BrokerPlugin[] {
                new BrokerPluginSupport() {
                    int consumerCount;

                    // broker is killed on x create consumer
                    @Override
                    public Subscription addConsumer(ConnectionContext context,
View Full Code Here

TOP

Related Classes of org.apache.activemq.broker.BrokerPluginSupport

Copyright © 2018 www.massapicom. 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.