Package org.apache.activemq.network

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


    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 {
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 broker networks
        NetworkConnector nc1 = bridgeBrokers("BrokerA", "BrokerB", dynamicOnly, networkTTL, conduit);
        nc1.setDecreaseNetworkConsumerPriority(decreaseNetworkConsumerPriority);
        nc1.setSuppressDuplicateQueueSubscriptions(suppressDuplicateQueueSubscriptions);
        nc1.addStaticallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.TOPIC_TYPE));
        //nc1.addExcludedDestination(ActiveMQDestination.createDestination("Consumer.*.global.>", ActiveMQDestination.QUEUE_TYPE));
        nc1.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.QUEUE_TYPE));
        nc1.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.TOPIC_TYPE));
        nc1.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("Consumer.*.global.>", ActiveMQDestination.QUEUE_TYPE));

View Full Code Here

        nc1.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("Consumer.*.global.>", ActiveMQDestination.QUEUE_TYPE));

        NetworkConnector nc2 = bridgeBrokers("BrokerB", "BrokerA", dynamicOnly, networkTTL, conduit);
        nc2.setDecreaseNetworkConsumerPriority(decreaseNetworkConsumerPriority);
        nc2.setSuppressDuplicateQueueSubscriptions(suppressDuplicateQueueSubscriptions);
        nc2.addStaticallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.TOPIC_TYPE));
        //nc2.addExcludedDestination(ActiveMQDestination.createDestination("Consumer.*.global.>", ActiveMQDestination.QUEUE_TYPE));
        nc2.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.QUEUE_TYPE));
        nc2.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("global.>", ActiveMQDestination.TOPIC_TYPE));
        nc2.addDynamicallyIncludedDestination(ActiveMQDestination.createDestination("Consumer.*.global.>", ActiveMQDestination.QUEUE_TYPE));
    }
View Full Code Here

        networkConnector.setDecreaseNetworkConsumerPriority(true);
        networkConnector.setDynamicOnly(dynamicOnly);
        networkConnector.setNetworkTTL(ttl);
        networkConnector.setSuppressDuplicateTopicSubscriptions(suppressDuplicateTopicSubs);
        networkConnector.setConsumerPriorityBase(BASE_PRIORITY);
        networkConnector.addStaticallyIncludedDestination(new ActiveMQTopic("BeStaticallyIncluded"));
       
        PolicyMap policyMap = new PolicyMap();
        PolicyEntry policy = new PolicyEntry();
        policy.setDispatchPolicy(dispatchPolicy);
        // the audit will suppress the duplicates as it defaults to true so this test
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

    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 {
View Full Code Here

        BrokerService brokerA = createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?persistent=true&useJmx=false&deleteAllMessagesOnStartup=true"));
        brokerA.setBrokerId("BrokerA");
        BrokerService brokerB = createBroker(new URI("broker:(tcp://localhost:61617)/BrokerB?persistent=true&useJmx=false&deleteAllMessagesOnStartup=true"));
        brokerB.setBrokerId("BrokerB");
        NetworkConnector aTOb = bridgeBrokers(brokers.get("BrokerA").broker, brokers.get("BrokerB").broker, false, 2, true, true);
        aTOb.addStaticallyIncludedDestination(queue);
        NetworkConnector bTOa = bridgeBrokers(brokers.get("BrokerB").broker, brokers.get("BrokerA").broker, false, 2, true, true);
        bTOa.addStaticallyIncludedDestination(queue);

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

        BrokerService brokerB = createBroker(new URI("broker:(tcp://localhost:61617)/BrokerB?persistent=true&useJmx=false&deleteAllMessagesOnStartup=true"));
        brokerB.setBrokerId("BrokerB");
        NetworkConnector aTOb = bridgeBrokers(brokers.get("BrokerA").broker, brokers.get("BrokerB").broker, false, 2, true, true);
        aTOb.addStaticallyIncludedDestination(queue);
        NetworkConnector bTOa = bridgeBrokers(brokers.get("BrokerB").broker, brokers.get("BrokerA").broker, false, 2, true, true);
        bTOa.addStaticallyIncludedDestination(queue);

        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.