Skip to content

Conversation

@ltamber
Copy link
Contributor

@ltamber ltamber commented Feb 27, 2020

Motivation

If set up maxMessagePublishBufferSizeInMB > Integer.MAX_VALUE / 1024 / 1024, the publish buffer limit does not take effect. The reason is maxMessagePublishBufferBytes always 0 when use following calculation method :

pulsar.getConfiguration().getMaxMessagePublishBufferSizeInMB() * 1024 * 1024;

So, changed to

pulsar.getConfiguration().getMaxMessagePublishBufferSizeInMB() * 1024L * 1024L;

@ltamber
Copy link
Contributor Author

ltamber commented Feb 27, 2020

@codelipenghui please take a look

@codelipenghui codelipenghui changed the title Fix overflow Fix publish buffer limit does not take effect Feb 27, 2020
@codelipenghui codelipenghui added the type/bug The PR fixed a bug or issue reported a bug label Feb 27, 2020
@codelipenghui codelipenghui added this to the 2.6.0 milestone Feb 27, 2020
@codelipenghui codelipenghui merged commit 75a321d into apache:master Feb 27, 2020
@ltamber ltamber deleted the fix-overflow branch February 27, 2020 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/2.5.1 type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants