BewareMyPower commented on a change in pull request #9702:
URL: https://github.com/apache/pulsar/pull/9702#discussion_r582420498



##########
File path: pulsar-client-cpp/lib/SinglePartitionMessageRouter.cc
##########
@@ -18,9 +18,23 @@
  */
 #include "SinglePartitionMessageRouter.h"
 
+#include <boost/random/mersenne_twister.hpp>
+#include <boost/random/uniform_int_distribution.hpp>
+#include <chrono>
+
 namespace pulsar {
 SinglePartitionMessageRouter::~SinglePartitionMessageRouter() {}
+
+SinglePartitionMessageRouter::SinglePartitionMessageRouter(const int 
numberOfPartitions,
+                                                           
ProducerConfiguration::HashingScheme hashingScheme)
+    : MessageRouterBase(hashingScheme) {
+    boost::random::mt19937 
rng(std::chrono::high_resolution_clock::now().time_since_epoch().count());
+    boost::random::uniform_int_distribution<int> dist;

Review comment:
       Should we use `std::random` from C++ standard library instead of 
`boost::random`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to