File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33* Fixed example broker's invalid sync connack call (#869 )
44* Added no CONNACK sending mode to the example broker (#869 )
55* Added posting code to acceptors (#867 )
6- * Added io_context and threads setting options for example broker (#866 , #871 )
6+ * Added io_context and threads setting options for example broker (#866 , #871 , # 872 )
77* Fixed moved from object access (#865 )
88* <<<< breaking change >>>> Removed ioc_con() and ioc_accept() (#866 )
99* <<<< breaking change >>>> Unified automatic async/sync choosing flag. (#857 , #862 )
Original file line number Diff line number Diff line change @@ -3,8 +3,13 @@ verbose=1
33certificate=server.crt.pem
44private_key=server.key.pem
55
6- iocs=1
7- threads_per_ioc=1
6+ # 0 means automatic
7+ # Num of vCPU
8+ iocs=0
9+
10+ # 0 means automatic
11+ # min(4 or Num of vCPU)
12+ threads_per_ioc=0
813
914# Reload interval for the certificate and private key files (hours)
1015# When configured the broker will perform automatic loading of
Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ void run_broker(boost::program_options::variables_map const& vm) {
350350 return 1 ;
351351 } ();
352352 if (threads_per_ioc == 0 ) {
353- threads_per_ioc = std::max (std::size_t (std::thread::hardware_concurrency ()), std::size_t (4 ));
353+ threads_per_ioc = std::min (std::size_t (std::thread::hardware_concurrency ()), std::size_t (4 ));
354354 MQTT_LOG (" mqtt_broker" , info) << " threads_per_ioc set to auto decide (0). Automatically set to " << threads_per_ioc;
355355 }
356356
You can’t perform that action at this time.
0 commit comments