Skip to content
Open
Show file tree
Hide file tree
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 @@ -74,6 +74,7 @@ public class MessageStoreConfig {
private int timerFlushIntervalMs = 1000;
private int timerGetMessageThreadNum = 3;
private int timerPutMessageThreadNum = 3;
private int timerMessageBufferSize = 512;

private boolean timerEnableDisruptor = false;

Expand Down Expand Up @@ -1671,6 +1672,14 @@ public void setTimerPutMessageThreadNum(int timerPutMessageThreadNum) {
this.timerPutMessageThreadNum = timerPutMessageThreadNum;
}

public int getTimerMessageBufferSize() {
return timerMessageBufferSize;
}

public void setTimerMessageBufferSize(int timerMessageBufferSize) {
this.timerMessageBufferSize = timerMessageBufferSize;
}

public boolean isTimerEnableDisruptor() {
return timerEnableDisruptor;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public TimerMessageStore(final MessageStore messageStore, final MessageStoreConf
bufferLocal = new ThreadLocal<ByteBuffer>() {
@Override
protected ByteBuffer initialValue() {
return ByteBuffer.allocateDirect(storeConfig.getMaxMessageSize() + 100);
return ByteBuffer.allocateDirect(storeConfig.getMaxMessageSize() + storeConfig.getTimerMessageBufferSize());
}
};

Expand Down
Loading