本文整理汇总了Java中org.apache.rocketmq.common.protocol.heartbeat.ConsumeType.CONSUME_PASSIVELY属性的典型用法代码示例。如果您正苦于以下问题:Java ConsumeType.CONSUME_PASSIVELY属性的具体用法?Java ConsumeType.CONSUME_PASSIVELY怎么用?Java ConsumeType.CONSUME_PASSIVELY使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.rocketmq.common.protocol.heartbeat.ConsumeType
的用法示例。
在下文中一共展示了ConsumeType.CONSUME_PASSIVELY属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: uploadFilterClassSource
private void uploadFilterClassSource() {
Iterator<Entry<String, MQConsumerInner>> it = this.consumerTable.entrySet().iterator();
while (it.hasNext()) {
Entry<String, MQConsumerInner> next = it.next();
MQConsumerInner consumer = next.getValue();
if (ConsumeType.CONSUME_PASSIVELY == consumer.consumeType()) {
Set<SubscriptionData> subscriptions = consumer.subscriptions();
for (SubscriptionData sub : subscriptions) {
if (sub.isClassFilterMode() && sub.getFilterClassSource() != null) {
final String consumerGroup = consumer.groupName();
final String className = sub.getSubString();
final String topic = sub.getTopic();
final String filterClassSource = sub.getFilterClassSource();
try {
this.uploadFilterClassToAllFilterServer(consumerGroup, className, topic, filterClassSource);
} catch (Exception e) {
log.error("uploadFilterClassToAllFilterServer Exception", e);
}
}
}
}
}
}
示例2: consumeType
@Override
public ConsumeType consumeType() {
return ConsumeType.CONSUME_PASSIVELY;
}
开发者ID:lirenzuo,项目名称:rocketmq-rocketmq-all-4.1.0-incubating,代码行数:4,代码来源:DefaultMQPushConsumerImpl.java
示例3: messageModelDesc
public String messageModelDesc() {
if (this.count != 0 && this.getConsumeType() == ConsumeType.CONSUME_PASSIVELY) {
return this.getMessageModel().toString();
}
return "";
}
开发者ID:lirenzuo,项目名称:rocketmq-rocketmq-all-4.1.0-incubating,代码行数:6,代码来源:ConsumerProgressSubCommand.java