@@ -69,7 +69,7 @@ def init_patch(self, *args, **kwargs):
6969 opt_cfg = {}
7070 else :
7171 # Get optimized configuration if Superstream is active
72- opt_cfg = optimal_cfg (metadata , topics_env , orig_cfg )
72+ opt_cfg = optimal_cfg (metadata , topics_env , orig_cfg , "kafka-python" )
7373
7474 # Apply optimized configuration
7575 for k , v in opt_cfg .items ():
@@ -91,6 +91,8 @@ def init_patch(self, *args, **kwargs):
9191 opt_cfg = opt_cfg ,
9292 report_interval_ms = int (report_interval or _DEFAULT_REPORT_INTERVAL_MS ),
9393 error = error_msg , # Store error message in tracker
94+ metadata = metadata ,
95+ topics_env = topics_env ,
9496 )
9597 Heartbeat .register_tracker (tr )
9698
@@ -186,7 +188,7 @@ def init_patch(self, *args, **kwargs):
186188 opt_cfg = {}
187189 else :
188190 # Get optimized configuration if Superstream is active
189- opt_cfg = optimal_cfg (metadata , topics_env , orig_cfg )
191+ opt_cfg = optimal_cfg (metadata , topics_env , orig_cfg , "aiokafka" )
190192 for k , v in opt_cfg .items ():
191193 if kwargs .get (k ) != v :
192194 logger .debug ("Overriding configuration: {} -> {}" , k , v )
@@ -201,6 +203,8 @@ def init_patch(self, *args, **kwargs):
201203 opt_cfg = opt_cfg ,
202204 report_interval_ms = int (report_interval or _DEFAULT_REPORT_INTERVAL_MS ),
203205 error = error_msg , # Store error message in tracker
206+ metadata = metadata ,
207+ topics_env = topics_env ,
204208 )
205209 Heartbeat .register_tracker (tr )
206210 orig_init (self , * args , ** kwargs )
@@ -283,7 +287,7 @@ def init_patch(self, conf: Dict[str, Any], *args, **kwargs):
283287 opt_cfg = {}
284288 else :
285289 # Get optimized configuration if Superstream is active
286- opt_cfg = optimal_cfg (metadata , topics_env , conf )
290+ opt_cfg = optimal_cfg (metadata , topics_env , conf , "confluent" )
287291 for k , v in opt_cfg .items ():
288292 if conf .get (k ) != v :
289293 logger .debug ("Overriding configuration: {} -> {}" , k , v )
@@ -298,6 +302,8 @@ def init_patch(self, conf: Dict[str, Any], *args, **kwargs):
298302 opt_cfg = opt_cfg ,
299303 report_interval_ms = int (report_interval or _DEFAULT_REPORT_INTERVAL_MS ),
300304 error = error_msg , # Store error message in tracker
305+ metadata = metadata ,
306+ topics_env = topics_env ,
301307 )
302308 Heartbeat .register_tracker (tr )
303309 orig_init (self , conf , * args , ** kwargs )
0 commit comments