Java Code Examples for com.alibaba.rocketmq.common.protocol.header.filtersrv.RegisterFilterServerResponseHeader#getBrokerName()
The following examples show how to use
com.alibaba.rocketmq.common.protocol.header.filtersrv.RegisterFilterServerResponseHeader#getBrokerName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FiltersrvController.java From reading-and-annotate-rocketmq-3.4.6 with GNU General Public License v3.0 | 6 votes |
public void registerFilterServerToBroker() { try { RegisterFilterServerResponseHeader responseHeader = this.filterServerOuterAPI.registerFilterServerToBroker( this.filtersrvConfig.getConnectWhichBroker(), this.localAddr()); this.defaultMQPullConsumer.getDefaultMQPullConsumerImpl().getPullAPIWrapper() .setDefaultBrokerId(responseHeader.getBrokerId()); if (null == this.brokerName) { this.brokerName = responseHeader.getBrokerName(); } log.info("register filter server<{}> to broker<{}> OK, Return: {} {}", // this.localAddr(),// this.filtersrvConfig.getConnectWhichBroker(),// responseHeader.getBrokerName(),// responseHeader.getBrokerId()// ); } catch (Exception e) { log.warn("register filter server Exception", e); log.warn("access broker failed, kill oneself"); System.exit(-1); } }
Example 2
Source File: FiltersrvController.java From rocketmq with Apache License 2.0 | 6 votes |
public void registerFilterServerToBroker() { try { RegisterFilterServerResponseHeader responseHeader = this.filterServerOuterAPI.registerFilterServerToBroker( this.filtersrvConfig.getConnectWhichBroker(), this.localAddr()); this.defaultMQPullConsumer.getDefaultMQPullConsumerImpl().getPullAPIWrapper() .setDefaultBrokerId(responseHeader.getBrokerId()); if (null == this.brokerName) { this.brokerName = responseHeader.getBrokerName(); } log.info("register filter server<{}> to broker<{}> OK, Return: {} {}", // this.localAddr(),// this.filtersrvConfig.getConnectWhichBroker(),// responseHeader.getBrokerName(),// responseHeader.getBrokerId()// ); } catch (Exception e) { log.warn("register filter server Exception", e); log.warn("access broker failed, kill oneself"); System.exit(-1); } }
Example 3
Source File: FiltersrvController.java From RocketMQ-Master-analyze with Apache License 2.0 | 6 votes |
public void registerFilterServerToBroker() { try { RegisterFilterServerResponseHeader responseHeader = this.filterServerOuterAPI .registerFilterServerToBroker(this.filtersrvConfig.getConnectWhichBroker(), this.localAddr()); this.defaultMQPullConsumer.getDefaultMQPullConsumerImpl().getPullAPIWrapper() .setDefaultBrokerId(responseHeader.getBrokerId()); if (null == this.brokerName) { this.brokerName = responseHeader.getBrokerName(); } log.info("register filter server<{}> to broker<{}> OK, Return: {} {}", // this.localAddr(), // this.filtersrvConfig.getConnectWhichBroker(), // responseHeader.getBrokerName(), // responseHeader.getBrokerId()// ); } catch (Exception e) { log.warn("register filter server Exception", e); // 如果失败,尝试自杀 log.warn("access broker failed, kill oneself"); System.exit(-1); } }