chennaji9 opened a new issue, #11291: URL: https://github.com/apache/rocketmq/issues/11291
### Description The transactional producer example in `docs/en/Example_Transaction.md` (section 2.1) imports the wrong classes — the imports belong to a *consumer* example, while the code body uses transaction-producer types: ```java import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus; import org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently; import org.apache.rocketmq.common.message.MessageExt; import java.util.List; ``` The class body instead uses `TransactionListener`, `TransactionMQProducer`, `ThreadPoolExecutor`, `ExecutorService`, `ArrayBlockingQueue`, `ThreadFactory`, `TimeUnit`, `Message`, `SendResult`, `RemotingHelper`, `MQClientException`, `UnsupportedEncodingException` (and `InterruptedException`). Copying the block as shown fails with `cannot find symbol` on `TransactionListener`. The `TransactionListenerImpl` snippet later in the page has the same problem: its body uses `MessageExt`, `Message`, `MessageQueue`, `LocalTransactionState`, `ConsumeConcurrentlyContext`-style context types etc. without listing the imports it needs. ### Expected behavior Both code blocks on the page should carry the imports their bodies actually use so a reader can compile the example directly. -- 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]
