apache / apache/pulsar

[Doc] Discrepancy in Pulsar's maxPendingMessages Default Value: Documentation vs Source Code

Open
#21,904 0 comments 0 reactions 1 assignee Claimed by @qiyingqizi View on GitHub
doc
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### What issue do you find in Pulsar docs?

The link says that the default value of maxPendingMessages is 1000, as per [this documentation](https://www.bookstack.cn/read/pulsar-3.1-en/8b057fe4ee63e90d.md).

However, in the source code of Pulsar 3.1.2, the default value obtained during debugging is 0.

The initialization location also shows 0.

![QQ图片20240116111222](https://github.com/apache/pulsar/assets/141155246/b331bbdb-217b-4b23-8550-b35fe1ed2c03)
![QQ图片20240116111227](https://github.com/apache/pulsar/assets/141155246/abef4a02-59e2-4c76-9aca-efeacd1766e3)
![QQ图片20240116111233](https://github.com/apache/pulsar/assets/141155246/35f4ae73-050d-4973-8152-5aa7acceaea9)
![QQ图片20240116111237](https://github.com/apache/pulsar/assets/141155246/bed6d6ad-7e15-4db0-b829-23d6786b3e41)

### What is your suggestion?

Given the discrepancy between the documentation and the actual default value observed in the source code, it would be beneficial to either update the documentation to reflect the correct default value or adjust the source code to match the documented default value.

### Any reference?

No additional references needed beyond the current documentation and source code.

### Are you willing to submit a PR?

- [X] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.