Zzaniu edited a comment on issue #114:
URL:
https://github.com/apache/rocketmq-client-python/issues/114#issuecomment-904515772
1.rocketmq == 4.8.0
2.rocketmq-client-python == 2.0.0
3.on_check callback function not execute
```python
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()
```

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