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 2019/10/31 02:02:03 UTC

[GitHub] [rocketmq-client-python] messense commented on a change in pull request #61: [ctypes]some new features support

messense commented on a change in pull request #61: [ctypes]some new features support
URL: https://github.com/apache/rocketmq-client-python/pull/61#discussion_r340933030
 
 

 ##########
 File path: rocketmq/client.py
 ##########
 @@ -397,15 +463,15 @@ def subscribe(self, topic, callback, expression='*'):
         def _on_message(consumer, msg):
             exc = None
             try:
-                callback(RecvMessage(msg))
-            except Exception as e:
+                return callback(RecvMessage(msg))
 
 Review comment:
   Needs to check `callback` return type, should be `int` or `ConsumeStatus`
   
   ```python
   return ConsumeStatus(callback(RecvMessage(msg)))
   ```
   
   Will raise `ValueError` when callback's return type is not a valid `ConsumerStatus` variant.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services