siddiqueirshad opened a new pull request, #164: URL: https://github.com/apache/rocketmq-client-python/pull/164
Fixes apache/rocketmq#11492 ### Problem Description In `TransactionMQProducer.__init__`, calling `super(TransactionMQProducer, self).__init__(group_id, timeout, compress_level, max_message_size)` caused two issues: 1. `Producer.__init__` has the signature `(group_id, orderly=False, timeout=None, compress_level=None, max_message_size=None)`. Calling it with positional arguments passed `timeout` into `orderly`, `compress_level` into `timeout`, and `max_message_size` into `compress_level`. 2. It allocated an unused regular or orderly producer handle via `dll.CreateProducer` or `dll.CreateOrderlyProducer`, which was then immediately discarded and overwritten by `self._handle = dll.CreateTransactionProducer(...)`, leaking the underlying native handle. ### Solution Remove the call to `super().__init__` in `TransactionMQProducer.__init__`. `TransactionMQProducer` explicitly initializes `self._callback_refs = []`, creates its transaction producer handle via `dll.CreateTransactionProducer`, and configures `timeout`, `compress_level`, and `max_message_size` directly on the correct handle. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
