[rocketmq-client-python] TransactionMQProducer allocates an unused producer during initialization

Abierto Apto para principiantes
#11,492 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
82/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Lee rocketmq/client.py, centrándote en TransactionMQProducer.__init__ y en los parámetros posicionales de Producer.__init__. Ejecuta la regresión offline con FFI de registro descrita en el issue, usando los valores de opción proporcionados. Se considera terminado cuando la construcción solo llama a CreateTransactionProducer y aplica cada opción una sola vez a ese handle.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Java
Estrellas
22.7k
Forks
12k
Merge medio
3 d 18 h
PR fusionados (30 d)
17

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/rocketmq

Todos los issues de apache/rocketmq

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.