Java Code Examples for org.apache.rocketmq.common.MixAll#DEFAULT_CONSUMER_GROUP
The following examples show how to use
org.apache.rocketmq.common.MixAll#DEFAULT_CONSUMER_GROUP .
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: DefaultLitePullConsumerImpl.java From rocketmq with Apache License 2.0 | 5 votes |
private void checkConfig() throws MQClientException { // Check consumerGroup Validators.checkGroup(this.defaultLitePullConsumer.getConsumerGroup()); // Check consumerGroup name is not equal default consumer group name. if (this.defaultLitePullConsumer.getConsumerGroup().equals(MixAll.DEFAULT_CONSUMER_GROUP)) { throw new MQClientException( "consumerGroup can not equal " + MixAll.DEFAULT_CONSUMER_GROUP + ", please specify another one." + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } // Check messageModel is not null. if (null == this.defaultLitePullConsumer.getMessageModel()) { throw new MQClientException( "messageModel is null" + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } // Check allocateMessageQueueStrategy is not null if (null == this.defaultLitePullConsumer.getAllocateMessageQueueStrategy()) { throw new MQClientException( "allocateMessageQueueStrategy is null" + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } if (this.defaultLitePullConsumer.getConsumerTimeoutMillisWhenSuspend() < this.defaultLitePullConsumer.getBrokerSuspendMaxTimeMillis()) { throw new MQClientException( "Long polling mode, the consumer consumerTimeoutMillisWhenSuspend must greater than brokerSuspendMaxTimeMillis" + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } }
Example 2
Source File: DefaultMQPullConsumer.java From rocketmq-read with Apache License 2.0 | 4 votes |
public DefaultMQPullConsumer() { this(MixAll.DEFAULT_CONSUMER_GROUP, null); }
Example 3
Source File: DefaultMQPullConsumerImpl.java From rocketmq with Apache License 2.0 | 4 votes |
private void checkConfig() throws MQClientException { // check consumerGroup Validators.checkGroup(this.defaultMQPullConsumer.getConsumerGroup()); // consumerGroup if (null == this.defaultMQPullConsumer.getConsumerGroup()) { throw new MQClientException( "consumerGroup is null" // + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), // null); } // consumerGroup if (this.defaultMQPullConsumer.getConsumerGroup().equals(MixAll.DEFAULT_CONSUMER_GROUP)) { throw new MQClientException( "consumerGroup can not equal "// + MixAll.DEFAULT_CONSUMER_GROUP // + ", please specify another one."// + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), // null); } // messageModel if (null == this.defaultMQPullConsumer.getMessageModel()) { throw new MQClientException( "messageModel is null" // + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), // null); } // allocateMessageQueueStrategy if (null == this.defaultMQPullConsumer.getAllocateMessageQueueStrategy()) { throw new MQClientException( "allocateMessageQueueStrategy is null" // + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), // null); } // allocateMessageQueueStrategy if (this.defaultMQPullConsumer.getConsumerTimeoutMillisWhenSuspend() < this.defaultMQPullConsumer.getBrokerSuspendMaxTimeMillis()) { throw new MQClientException( "Long polling mode, the consumer consumerTimeoutMillisWhenSuspend must greater than brokerSuspendMaxTimeMillis" // + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), // null); } }
Example 4
Source File: DefaultMQPullConsumer.java From rocketmq_trans_message with Apache License 2.0 | 4 votes |
public DefaultMQPullConsumer(RPCHook rpcHook) { this(MixAll.DEFAULT_CONSUMER_GROUP, rpcHook); }
Example 5
Source File: DefaultMQPullConsumerImpl.java From rocketmq with Apache License 2.0 | 4 votes |
private void checkConfig() throws MQClientException { // check consumerGroup Validators.checkGroup(this.defaultMQPullConsumer.getConsumerGroup()); // consumerGroup if (null == this.defaultMQPullConsumer.getConsumerGroup()) { throw new MQClientException( "consumerGroup is null" + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } // consumerGroup if (this.defaultMQPullConsumer.getConsumerGroup().equals(MixAll.DEFAULT_CONSUMER_GROUP)) { throw new MQClientException( "consumerGroup can not equal " + MixAll.DEFAULT_CONSUMER_GROUP + ", please specify another one." + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } // messageModel if (null == this.defaultMQPullConsumer.getMessageModel()) { throw new MQClientException( "messageModel is null" + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } // allocateMessageQueueStrategy if (null == this.defaultMQPullConsumer.getAllocateMessageQueueStrategy()) { throw new MQClientException( "allocateMessageQueueStrategy is null" + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } // allocateMessageQueueStrategy if (this.defaultMQPullConsumer.getConsumerTimeoutMillisWhenSuspend() < this.defaultMQPullConsumer.getBrokerSuspendMaxTimeMillis()) { throw new MQClientException( "Long polling mode, the consumer consumerTimeoutMillisWhenSuspend must greater than brokerSuspendMaxTimeMillis" + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } }
Example 6
Source File: DefaultMQPullConsumerImpl.java From rocketmq-read with Apache License 2.0 | 4 votes |
/** * 检查相关的配置 * @throws MQClientException mqClientException */ private void checkConfig() throws MQClientException { // check consumerGroup Validators.checkGroup(this.defaultMQPullConsumer.getConsumerGroup()); // consumerGroup if (null == this.defaultMQPullConsumer.getConsumerGroup()) { throw new MQClientException( "consumerGroup is null" + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } // consumerGroup if (this.defaultMQPullConsumer.getConsumerGroup().equals(MixAll.DEFAULT_CONSUMER_GROUP)) { throw new MQClientException( "consumerGroup can not equal " + MixAll.DEFAULT_CONSUMER_GROUP + ", please specify another one." + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } // messageModel if (null == this.defaultMQPullConsumer.getMessageModel()) { throw new MQClientException( "messageModel is null" + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } // allocateMessageQueueStrategy if (null == this.defaultMQPullConsumer.getAllocateMessageQueueStrategy()) { throw new MQClientException( "allocateMessageQueueStrategy is null" + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } // allocateMessageQueueStrategy if (this.defaultMQPullConsumer.getConsumerTimeoutMillisWhenSuspend() < this.defaultMQPullConsumer.getBrokerSuspendMaxTimeMillis()) { throw new MQClientException( "Long polling mode, the consumer consumerTimeoutMillisWhenSuspend must greater than brokerSuspendMaxTimeMillis" + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), null); } }
Example 7
Source File: DefaultMQPushConsumer.java From DDMQ with Apache License 2.0 | 4 votes |
/** * Default constructor. */ public DefaultMQPushConsumer() { this(MixAll.DEFAULT_CONSUMER_GROUP, null, new AllocateMessageQueueAveragely()); }
Example 8
Source File: DefaultMQPullConsumer.java From rocketmq-read with Apache License 2.0 | 4 votes |
public DefaultMQPullConsumer(RPCHook rpcHook) { this(MixAll.DEFAULT_CONSUMER_GROUP, rpcHook); }
Example 9
Source File: DefaultMQPullConsumerImpl.java From rocketmq_trans_message with Apache License 2.0 | 4 votes |
private void checkConfig() throws MQClientException { // check consumerGroup Validators.checkGroup(this.defaultMQPullConsumer.getConsumerGroup()); // consumerGroup if (null == this.defaultMQPullConsumer.getConsumerGroup()) { throw new MQClientException( "consumerGroup is null" // + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), // null); } // consumerGroup if (this.defaultMQPullConsumer.getConsumerGroup().equals(MixAll.DEFAULT_CONSUMER_GROUP)) { throw new MQClientException( "consumerGroup can not equal "// + MixAll.DEFAULT_CONSUMER_GROUP // + ", please specify another one."// + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), // null); } // messageModel if (null == this.defaultMQPullConsumer.getMessageModel()) { throw new MQClientException( "messageModel is null" // + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), // null); } // allocateMessageQueueStrategy if (null == this.defaultMQPullConsumer.getAllocateMessageQueueStrategy()) { throw new MQClientException( "allocateMessageQueueStrategy is null" // + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), // null); } // allocateMessageQueueStrategy if (this.defaultMQPullConsumer.getConsumerTimeoutMillisWhenSuspend() < this.defaultMQPullConsumer.getBrokerSuspendMaxTimeMillis()) { throw new MQClientException( "Long polling mode, the consumer consumerTimeoutMillisWhenSuspend must greater than brokerSuspendMaxTimeMillis" // + FAQUrl.suggestTodo(FAQUrl.CLIENT_PARAMETER_CHECK_URL), // null); } }
Example 10
Source File: DefaultMQPushConsumer.java From rocketmq_trans_message with Apache License 2.0 | 4 votes |
/** * Default constructor. */ public DefaultMQPushConsumer() { this(MixAll.DEFAULT_CONSUMER_GROUP, null, new AllocateMessageQueueAveragely()); }
Example 11
Source File: DefaultMQPushConsumer.java From rocketmq-4.3.0 with Apache License 2.0 | 4 votes |
/** * Default constructor. */ public DefaultMQPushConsumer() { this(MixAll.DEFAULT_CONSUMER_GROUP, null, new AllocateMessageQueueAveragely()); }
Example 12
Source File: DefaultLitePullConsumer.java From rocketmq with Apache License 2.0 | 4 votes |
/** * Default constructor. */ public DefaultLitePullConsumer() { this(null, MixAll.DEFAULT_CONSUMER_GROUP, null); }
Example 13
Source File: DefaultMQPushConsumer.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 4 votes |
/** * Default constructor. */ public DefaultMQPushConsumer() { this(MixAll.DEFAULT_CONSUMER_GROUP, null, new AllocateMessageQueueAveragely()); }
Example 14
Source File: DefaultMQPullConsumer.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 4 votes |
public DefaultMQPullConsumer() { this(MixAll.DEFAULT_CONSUMER_GROUP, null); }
Example 15
Source File: DefaultMQPullConsumer.java From DDMQ with Apache License 2.0 | 4 votes |
public DefaultMQPullConsumer(RPCHook rpcHook) { this(MixAll.DEFAULT_CONSUMER_GROUP, rpcHook); }
Example 16
Source File: DefaultMQPushConsumer.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 2 votes |
/** * Constructor specifying RPC hook. * @param rpcHook RPC hook to execute before each remoting command. */ public DefaultMQPushConsumer(RPCHook rpcHook) { this(MixAll.DEFAULT_CONSUMER_GROUP, rpcHook, new AllocateMessageQueueAveragely()); }
Example 17
Source File: DefaultMQPushConsumer.java From rocketmq-read with Apache License 2.0 | 2 votes |
/** * Constructor specifying RPC hook. * * @param rpcHook RPC hook to execute before each remoting command. * 注册rpc勾子 */ public DefaultMQPushConsumer(RPCHook rpcHook) { this(MixAll.DEFAULT_CONSUMER_GROUP, rpcHook, new AllocateMessageQueueAveragely()); }
Example 18
Source File: DefaultMQPushConsumer.java From DDMQ with Apache License 2.0 | 2 votes |
/** * Constructor specifying RPC hook. * * @param rpcHook RPC hook to execute before each remoting command. */ public DefaultMQPushConsumer(RPCHook rpcHook) { this(MixAll.DEFAULT_CONSUMER_GROUP, rpcHook, new AllocateMessageQueueAveragely()); }
Example 19
Source File: DefaultMQPushConsumer.java From rocketmq_trans_message with Apache License 2.0 | 2 votes |
/** * Constructor specifying RPC hook. * @param rpcHook RPC hook to execute before each remoting command. */ public DefaultMQPushConsumer(RPCHook rpcHook) { this(MixAll.DEFAULT_CONSUMER_GROUP, rpcHook, new AllocateMessageQueueAveragely()); }
Example 20
Source File: DefaultMQPushConsumer.java From rocketmq with Apache License 2.0 | 2 votes |
/** * Constructor specifying RPC hook. * * @param rpcHook RPC hook to execute before each remoting command. */ public DefaultMQPushConsumer(RPCHook rpcHook) { this(null, MixAll.DEFAULT_CONSUMER_GROUP, rpcHook, new AllocateMessageQueueAveragely()); }