dajiaohuang opened a new issue, #11492: URL: https://github.com/apache/rocketmq/issues/11492
### Component `apache/rocketmq-client-python`, `rocketmq/client.py`, `TransactionMQProducer.__init__`. ### Problem `TransactionMQProducer.__init__` calls the `Producer` initializer with positional arguments `(group_id, timeout, compress_level, max_message_size)`. In `Producer.__init__`, the second positional parameter is `orderly`, followed by `timeout`, `compress_level`, and `max_message_size`. Thus construction first allocates a regular/orderly producer and then replaces `_handle` with the transaction-producer handle, losing the first native handle. When options are supplied, the base initializer also applies them to the discarded handle with shifted meanings before the transaction producer applies them again. ### Expected behavior Transaction-producer construction should allocate only its transaction-producer handle and apply each supplied option to that handle once. ### Evidence An offline recording-FFI regression test invokes the constructor with `timeout=1234`, `compress_level=3`, and `max_message_size=2048`. Before the fix it observes an unexpected `CreateOrderlyProducer` call; after the fix it observes only `CreateTransactionProducer` and the correctly targeted setters. No broker or native RocketMQ library is needed for this reproduction. ### Scope This issue concerns the Python wrapper's constructor/resource handling only. It does not require a broker, production data, credentials, or changes to RocketMQ server behavior. -- 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]
