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:57 UTC

[rocketmq-clients] branch fix_producer_setting created (now 3e8f4b7)

This is an automated email from the ASF dual-hosted git repository.

lizhanhui pushed a change to branch fix_producer_setting
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git


      at 3e8f4b7  Add initial max body size in client setting frame for producer

This branch includes the following new commits:

     new 3e8f4b7  Add initial max body size in client setting frame for producer

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[rocketmq-clients] 01/01: Add initial max body size in client setting frame for producer

Posted by li...@apache.org.
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_);