本文整理匯總了Java中org.apache.rocketmq.store.MessageArrivingListener類的典型用法代碼示例。如果您正苦於以下問題:Java MessageArrivingListener類的具體用法?Java MessageArrivingListener怎麽用?Java MessageArrivingListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MessageArrivingListener類屬於org.apache.rocketmq.store包,在下文中一共展示了MessageArrivingListener類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: MessageStorePluginContext
import org.apache.rocketmq.store.MessageArrivingListener; //導入依賴的package包/類
public MessageStorePluginContext(MessageStoreConfig messageStoreConfig,
BrokerStatsManager brokerStatsManager, MessageArrivingListener messageArrivingListener,
BrokerConfig brokerConfig) {
super();
this.messageStoreConfig = messageStoreConfig;
this.brokerStatsManager = brokerStatsManager;
this.messageArrivingListener = messageArrivingListener;
this.brokerConfig = brokerConfig;
}
開發者ID:lirenzuo,項目名稱:rocketmq-rocketmq-all-4.1.0-incubating,代碼行數:10,代碼來源:MessageStorePluginContext.java
示例2: gen
import org.apache.rocketmq.store.MessageArrivingListener; //導入依賴的package包/類
protected DefaultMessageStore gen(ConsumerFilterManager filterManager) throws Exception {
MessageStoreConfig messageStoreConfig = buildStoreConfig(
commitLogFileSize, cqFileSize, true, cqExtFileSize
);
BrokerConfig brokerConfig = new BrokerConfig();
brokerConfig.setEnableCalcFilterBitMap(true);
brokerConfig.setMaxErrorRateOfBloomFilter(20);
brokerConfig.setExpectConsumerNumUseFilter(64);
DefaultMessageStore master = new DefaultMessageStore(
messageStoreConfig,
new BrokerStatsManager(brokerConfig.getBrokerClusterName()),
new MessageArrivingListener() {
@Override
public void arriving(String topic, int queueId, long logicOffset, long tagsCode,
long msgStoreTime, byte[] filterBitMap, Map<String, String> properties) {
}
}
, brokerConfig);
master.getDispatcherList().addFirst(new CommitLogDispatcher() {
@Override
public void dispatch(DispatchRequest request) {
try {
} catch (Throwable e) {
e.printStackTrace();
}
}
});
master.getDispatcherList().addFirst(new CommitLogDispatcherCalcBitMap(brokerConfig, filterManager));
assertThat(master.load()).isTrue();
master.start();
return master;
}
示例3: getMessageArrivingListener
import org.apache.rocketmq.store.MessageArrivingListener; //導入依賴的package包/類
public MessageArrivingListener getMessageArrivingListener() {
return messageArrivingListener;
}
開發者ID:lirenzuo,項目名稱:rocketmq-rocketmq-all-4.1.0-incubating,代碼行數:4,代碼來源:MessageStorePluginContext.java
示例4: gen
import org.apache.rocketmq.store.MessageArrivingListener; //導入依賴的package包/類
protected DefaultMessageStore gen(ConsumerFilterManager filterManager) throws Exception {
MessageStoreConfig messageStoreConfig = buildStoreConfig(
commitLogFileSize, cqFileSize, true, cqExtFileSize
);
BrokerConfig brokerConfig = new BrokerConfig();
brokerConfig.setEnableCalcFilterBitMap(true);
brokerConfig.setMaxErrorRateOfBloomFilter(20);
brokerConfig.setExpectConsumerNumUseFilter(64);
DefaultMessageStore master = new DefaultMessageStore(
messageStoreConfig,
new BrokerStatsManager(brokerConfig.getBrokerClusterName()),
new MessageArrivingListener() {
@Override
public void arriving(String topic, int queueId, long logicOffset, long tagsCode,
long msgStoreTime, byte[] filterBitMap, Map<String, String> properties) {
// System.out.println(String.format("Msg coming: %s, %d, %d, %d",
// topic, queueId, logicOffset, tagsCode));
}
}
, brokerConfig);
master.getDispatcherList().addFirst(new CommitLogDispatcher() {
@Override
public void dispatch(DispatchRequest request) {
try {
// System.out.println(String.format("offset:%d, bitMap:%s", request.getCommitLogOffset(),
// BitsArray.create(request.getBitMap()).toString()));
} catch (Throwable e) {
e.printStackTrace();
}
}
});
master.getDispatcherList().addFirst(new CommitLogDispatcherCalcBitMap(brokerConfig, filterManager));
assertThat(master.load()).isTrue();
master.start();
return master;
}
開發者ID:lirenzuo,項目名稱:rocketmq-rocketmq-all-4.1.0-incubating,代碼行數:43,代碼來源:MessageStoreWithFilterTest.java