You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/06/27 10:37:12 UTC

[GitHub] [rocketmq-client-python] yinhuanyi opened a new issue #114: I use this producer example to send transaction message to RocketMQ, why the local_execute callback function cannot execute?

yinhuanyi opened a new issue #114:
URL: https://github.com/apache/rocketmq-client-python/issues/114


   
   1. Please describe the issue you observed:
   I use this producer example to send transaction message to RocketMQ, why the  local_execute callback function cannot execute?
   
   2. Please tell us about your environment:
   
   mac os
   
   3. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
   
   def send_transaction_message(count):
       producer = TransactionMQProducer(gid, check_callback)
       producer.set_name_server_address(name_srv)
       producer.start()
       for n in range(count):
           msg = create_message()
           ret = producer.send_message_in_transaction(msg, local_execute, None)
           print ('send message status: ' + str(ret.status) + ' msgId: ' + ret.msg_id)
       print ('send transaction message done')
   
       while True:
           time.sleep(3600)


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-python] Zzaniu edited a comment on issue #114: I use this producer example to send transaction message to RocketMQ, why the check_callback callback function cannot execute?

Posted by GitBox <gi...@apache.org>.
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
   
   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()
   ```
   ![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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-python] Zzaniu edited a comment on issue #114: I use this producer example to send transaction message to RocketMQ, why the check_callback callback function cannot execute?

Posted by GitBox <gi...@apache.org>.
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()
   ```
   ![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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-python] yuxuemin247 commented on issue #114: I use this producer example to send transaction message to RocketMQ, why the check_callback callback function cannot execute?

Posted by GitBox <gi...@apache.org>.
yuxuemin247 commented on issue #114:
URL: https://github.com/apache/rocketmq-client-python/issues/114#issuecomment-996708586


   > producer output message like this below, check_callback function does not execute
   > 
   > ```
   > local:   message body
   > send message status: SendStatus.OK msgId: 7F000001408D27F819B48AAED2170000
   > send transaction message done
   > ```
   
   这个问题你怎么解决的呢?


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-python] yuxuemin247 removed a comment on issue #114: I use this producer example to send transaction message to RocketMQ, why the check_callback callback function cannot execute?

Posted by GitBox <gi...@apache.org>.
yuxuemin247 removed a comment on issue #114:
URL: https://github.com/apache/rocketmq-client-python/issues/114#issuecomment-996707798






-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-python] yuxuemin247 commented on issue #114: I use this producer example to send transaction message to RocketMQ, why the check_callback callback function cannot execute?

Posted by GitBox <gi...@apache.org>.
yuxuemin247 commented on issue #114:
URL: https://github.com/apache/rocketmq-client-python/issues/114#issuecomment-996707798


   Is this solved? I'm having the same problem
   1、rocketmq ==V.5.2
   2、mac rocketmq-client-python == 2.0.0


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-python] Zzaniu edited a comment on issue #114: I use this producer example to send transaction message to RocketMQ, why the check_callback callback function cannot execute?

Posted by GitBox <gi...@apache.org>.
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
   
   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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-python] yinhuanyi edited a comment on issue #114: I use this producer example to send transaction message to RocketMQ, why the check_callback callback function cannot execute?

Posted by GitBox <gi...@apache.org>.
yinhuanyi edited a comment on issue #114:
URL: https://github.com/apache/rocketmq-client-python/issues/114#issuecomment-869171693


   producer output message like this below, check_callback function does not execute
   ```
   local:   message body
   send message status: SendStatus.OK msgId: 7F000001408D27F819B48AAED2170000
   send transaction message done
   ```


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-python] Zzaniu commented on issue #114: I use this producer example to send transaction message to RocketMQ, why the check_callback callback function cannot execute?

Posted by GitBox <gi...@apache.org>.
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-python] yinhuanyi commented on issue #114: I use this producer example to send transaction message to RocketMQ, why the check_callback callback function cannot execute?

Posted by GitBox <gi...@apache.org>.
yinhuanyi commented on issue #114:
URL: https://github.com/apache/rocketmq-client-python/issues/114#issuecomment-869171693


   producer output message like this: 
   ```
   local:   message body
   send message status: SendStatus.OK msgId: 7F000001408D27F819B48AAED2170000
   send transaction message done
   ```


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org