[rocketmq-client-python] TransactionMQProducer allocates an unused producer during initialization
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- backend, distributed-systems
Research direction
Read rocketmq/client.py, focusing on TransactionMQProducer.__init__ and the positional parameters in Producer.__init__. Run the offline recording-FFI regression described in the issue with the supplied option values. Done means construction calls only CreateTransactionProducer and applies each option once to that handle.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Java
- Stars
- 22.7k
- Forks
- 12k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 17
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/rocketmq
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationPossibly taken @amalsaidov claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
CompressionType.of fails under the Turkish localePossibly taken @sharanggupta claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
[Bug] notifyMasterOnline aborts the long-polling wake-up with a NullPointerException when an arrival drains a bucket firstPossibly taken @iloveeyjafjalla claimed this 29 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/rocketmq#11441 · 1 comment ·
Maintainers usually reply within 1 day
-
[Enhancement] FilterFactory duplicate-registration and unregister semantics lack testsPossibly taken @chennaji9 claimed this 34 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
apache/rocketmq#11340 · 2 comments ·
Maintainers usually reply within 1 day
-
[Enhancement] LogicExpression three-valued truth table and short-circuit behavior lack direct testsPossibly taken @chennaji9 claimed this 34 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/rocketmq#11339 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
bug emitter:client:csharp
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
microsoft/typespec#12572 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Open
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
needs-area-label
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
area/ai area/backend component/zeebe kind/task
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
spAnser/reacharound#38 ·