Examples of BrokerInfo


Examples of org.apache.activemq.command.BrokerInfo

                        ((Tracked)object).onResponses();
                    }
                }
                if (!initialized) {
                    if (command.isBrokerInfo()) {
                        BrokerInfo info = (BrokerInfo)command;
                        BrokerInfo[] peers = info.getPeerBrokerInfos();
                        if (peers != null) {
                            for (int i = 0; i < peers.length; i++) {
                                String brokerString = peers[i].getBrokerURL();
                                add(brokerString);
                            }
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

        localBroker = control.createMock(Transport.class);
        remoteBroker = control.createMock(Transport.class);

        NetworkBridgeConfiguration configuration = new NetworkBridgeConfiguration();
        brokerService = new BrokerService();
        BrokerInfo remoteBrokerInfo = new BrokerInfo();

        configuration.setDuplex(true);
        configuration.setNetworkTTL(5);
        brokerService.setBrokerId("broker-1");
        brokerService.setPersistent(false);
        brokerService.setUseJmx(false);
        brokerService.start();
        brokerService.waitUntilStarted();
        remoteBrokerInfo.setBrokerId(new BrokerId("remote-broker-id"));
        remoteBrokerInfo.setBrokerName("remote-broker-name");

        localBroker.setTransportListener(EasyMock.isA(TransportListener.class));
        ArgHolder localListenerRef = ArgHolder.holdArgsForLastVoidCall();

        remoteBroker.setTransportListener(EasyMock.isA(TransportListener.class));
View Full Code Here

Examples of org.apache.activemq.command.BrokerInfo

            if (LOG.isTraceEnabled()) {
                LOG.trace(configuration.getBrokerName() + " starting remote Bridge, localBroker=" + localBroker);
            }
            synchronized (this) {
                if (!isCreatedByDuplex()) {
                    BrokerInfo brokerInfo = new BrokerInfo();
                    brokerInfo.setBrokerName(configuration.getBrokerName());
                    brokerInfo.setNetworkConnection(true);
                    brokerInfo.setDuplexConnection(configuration.isDuplex());
                    // set our properties
                    Properties props = new Properties();
                    IntrospectionSupport.getProperties(configuration, props, null);
                    String str = MarshallingSupport.propertiesToString(props);
                    brokerInfo.setNetworkProperties(str);
                    brokerInfo.setBrokerId(this.localBrokerId);
                    remoteBroker.oneway(brokerInfo);
                }
                if (remoteConnectionInfo != null) {
                    remoteBroker.oneway(remoteConnectionInfo.createRemoveCommand());
                }
View Full Code Here

Examples of org.apache.twill.kafka.client.BrokerInfo

   * Retrieves the last offset before the given timestamp for a given topic partition.
   *
   * @return The last offset before the given timestamp or {@code 0} if failed to do so.
   */
  private long getLastOffset(TopicPartition topicPart, long timestamp) {
    BrokerInfo brokerInfo = brokerService.getLeader(topicPart.getTopic(), topicPart.getPartition());
    SimpleConsumer consumer = brokerInfo == null ? null : consumers.getUnchecked(brokerInfo);

    // If no broker, treat it as failure attempt.
    if (consumer == null) {
      LOG.warn("Failed to talk to any broker. Default offset to 0 for {}", topicPart);
View Full Code Here

Examples of org.codehaus.activemq.message.BrokerInfo

        }
    }
   
    private void sendBrokerInfo() throws JMSException{
        //inform the other side we are a remote channel
        BrokerInfo info = new BrokerInfo();
        info.setBrokerName(brokerContainer.getBroker().getBrokerName());
        info.setClusterName(brokerContainer.getBroker().getBrokerClusterName());
        info.setRemote(true);
        boondocksChannel.asyncSend(info);
    }
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.