Package org.apache.activemq.network

Examples of org.apache.activemq.network.NetworkConnector.addStaticallyIncludedDestination()


    protected void restartBroker(String brokerName) throws Exception {
        destroyBroker("BrokerA");
        BrokerService broker = createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?persistent=true&useJmx=false"));
        broker.setBrokerId("BrokerA");
        NetworkConnector aTOb = bridgeBrokers(brokers.get("BrokerA").broker, brokers.get("BrokerB").broker, false, 2, true, true);
        aTOb.addStaticallyIncludedDestination(queue);
        broker.start();
        broker.waitUntilStarted();
        waitForBridgeFormation();
    }
View Full Code Here


    private NetworkConnector bridge(BrokerService from, BrokerService to) throws Exception {
        TransportConnector toConnector = to.getTransportConnectors().get(0);
        NetworkConnector bridge =
                from.addNetworkConnector("static://" + toConnector.getPublishableConnectString());
        bridge.addStaticallyIncludedDestination(sendQ);
        bridge.addStaticallyIncludedDestination(replyQWildcard);
        return bridge;
    }

    private BrokerService configureBroker(String brokerName) throws Exception {
        BrokerService broker = new BrokerService();
View Full Code Here

        }
    }

    protected NetworkConnector bridgeBrokersWithIncludedDestination(String localBrokerName, String remoteBrokerName, ActiveMQDestination included, ActiveMQDestination excluded) throws Exception {
        NetworkConnector nc = bridgeBrokers(localBrokerName, remoteBrokerName, false, 4, true);
        nc.addStaticallyIncludedDestination(included);
        if (excluded != null) {
            nc.addExcludedDestination(excluded);
        }
        nc.setPrefetchSize(1);
        return nc;
View Full Code Here

        // Setup destination
        ActiveMQDestination dest = createDestination("TEST", false);
        ActiveMQDestination dest1 = createDestination("TEST1", false);

        NetworkConnector bridgeAB =bridgeBrokers("BrokerA", "BrokerB", true);
        bridgeAB.addStaticallyIncludedDestination(dest);
        bridgeAB.setStaticBridge(true);

        startAllBrokers();
        waitForBridgeFormation();
View Full Code Here

        // Create queue
        ActiveMQDestination dest = createDestination("TEST.FOO", false);

        // statically include our destination
        networkConnector.addStaticallyIncludedDestination(dest);

        // Run brokers
        startAllBrokers();

        waitForBridgeFormation();
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.