Zzaniu commented on issue #114:
URL: 
https://github.com/apache/rocketmq-client-python/issues/114#issuecomment-904515772


   1.rocketmq-client-python == 2.0.0
   2.on_check callback function not execute
   
   def test_transaction_producer():
       stop_event = threading.Event()
       msg_body = 'XXXX'
   
       def on_local_execute(msg, user_args):
           return TransactionStatus.UNKNOWN
   
       def on_check(msg):
           stop_event.set()
           assert msg.body.decode('utf-8') == msg_body
           return TransactionStatus.COMMIT
   
       producer = TransactionMQProducer('transactionTestGroup' + 
str(PY_VERSION), on_check)
       producer.set_name_server_address('127.0.0.1:9876')
       producer.start()
       msg = Message('test')
       msg.set_keys('transaction')
       msg.set_tags('XXX')
       msg.set_body(msg_body)
       producer.send_message_in_transaction(msg, on_local_execute)
       while not stop_event.is_set():
           time.sleep(2)
       producer.shutdown()
   
   
![image](https://user-images.githubusercontent.com/37571303/130600425-f35c2080-70c4-499c-886c-c74ae99c9b30.png)
   


-- 
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]


Reply via email to