Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change LogRecord.class to MessageLogRecord.class to solve the problem… #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import qunar.tc.qmq.delay.store.log.*;
import qunar.tc.qmq.delay.store.model.AppendLogResult;
import qunar.tc.qmq.delay.store.model.LogRecord;
import qunar.tc.qmq.delay.store.model.MessageLogRecord;
import qunar.tc.qmq.delay.store.model.RawMessageExtend;
import qunar.tc.qmq.delay.store.model.ScheduleSetRecord;
import qunar.tc.qmq.delay.wheel.WheelLoadCursor;
Expand Down Expand Up @@ -62,7 +63,7 @@ public DefaultDelayLogFacade(final StoreConfiguration config, final Function<Sch
this.dispatchLog = new DispatchLog(config);
this.offsetManager = new IterateOffsetManager(config.getCheckpointStorePath(), scheduleLog::flush);
FixedExecOrderEventBus bus = new FixedExecOrderEventBus();
bus.subscribe(LogRecord.class, e -> {
bus.subscribe(MessageLogRecord.class, e -> {
AppendLogResult<ScheduleIndex> result = appendScheduleLog(e);
int code = result.getCode();
if (MessageProducerCode.SUCCESS != code) {
Expand All @@ -71,7 +72,7 @@ public DefaultDelayLogFacade(final StoreConfiguration config, final Function<Sch
}
func.apply(result.getAdditional());
});
bus.subscribe(LogRecord.class, e -> {
bus.subscribe(MessageLogRecord.class, e -> {
long checkpoint = e.getStartWroteOffset() + e.getRecordSize();
updateIterateOffset(checkpoint);
});
Expand Down