You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by li...@apache.org on 2022/09/27 04:53:58 UTC
[rocketmq-clients] 01/01: Add initial max body size in client setting frame for producer
This is an automated email from the ASF dual-hosted git repository.
lizhanhui pushed a commit to branch fix_producer_setting
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git
commit 3e8f4b709efb324da4dae794df80f5435480cfd6
Author: Li Zhanhui <li...@gmail.com>
AuthorDate: Tue Sep 27 12:53:36 2022 +0800
Add initial max body size in client setting frame for producer
---
cpp/source/rocketmq/ProducerImpl.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/cpp/source/rocketmq/ProducerImpl.cpp b/cpp/source/rocketmq/ProducerImpl.cpp
index 7ad127c..ecd2ac3 100644
--- a/cpp/source/rocketmq/ProducerImpl.cpp
+++ b/cpp/source/rocketmq/ProducerImpl.cpp
@@ -581,6 +581,9 @@ void ProducerImpl::topicsOfInterest(std::vector<std::string> topics) {
void ProducerImpl::buildClientSettings(rmq::Settings& settings) {
settings.set_client_type(rmq::ClientType::PRODUCER);
+ settings.mutable_publishing()->set_max_body_size(MixAll::MAX_MESSAGE_BODY_SIZE);
+ settings.mutable_publishing()->set_validate_message_type(false);
+
auto topics = settings.mutable_publishing()->mutable_topics();
{
absl::MutexLock lk(&topics_mtx_);