Examples of DiscoveryNetworkConnector


Examples of org.apache.activemq.network.DiscoveryNetworkConnector

        tConnector.setUri(new URI(uri1));
        tConnector.setName(brokerName + ".transportConnector");
        brokerService.addConnector(tConnector);

        if (uri2 != null) {
            final NetworkConnector nc = new DiscoveryNetworkConnector(new URI("static:" + uri2 + "," + uri3 + "," + uri4));
            nc.setBridgeTempDestinations(true);
            nc.setBrokerName(brokerName);

            // When using queue limits set this to 1
            nc.setPrefetchSize(1000);
            nc.setNetworkTTL(1);
            brokerService.addNetworkConnector(nc);
        }

        return brokerService;
    }
View Full Code Here

Examples of org.codehaus.activemq.transport.DiscoveryNetworkConnector

        ZeroconfDiscoveryAgent agent = new ZeroconfDiscoveryAgent();
        agent.setType(getClass().getName() + ".");
        container.setDiscoveryAgent(agent);
        String url = "tcp://localhost:0";
        container.addConnector(url);
        container.addNetworkConnector(new DiscoveryNetworkConnector(container));
        container.start();
        //embedded brokers are resolved by url - so make url unique
        //this confused me tests for a while :-)
        return new ActiveMQConnectionFactory(container,"vm://"+brokerName);
    }
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.