Heisenberg2017 opened a new issue, #127:
URL: https://github.com/apache/rocketmq-client-python/issues/127

   **BUG REPORT**
   
   consumer.shutdown() is unreachable :
   
   `import time
   
   from rocketmq.client import PushConsumer, ConsumeStatus
   
   
   def callback(msg):
       print(msg.id, msg.body)
       return ConsumeStatus.CONSUME_SUCCESS
   
   
   consumer = PushConsumer('CID_XXX')
   consumer.set_name_server_address('127.0.0.1:9876')
   consumer.subscribe('YOUR-TOPIC', callback)
   consumer.start()
   
   while True:
       time.sleep(3600)
   
   consumer.shutdown() # <- _This code is unreachable_ 
   `
   
   maybe can be changed to
   
   `
   try:
       while True:
           time.sleep(3600)
   except KeyboardInterrupt:
       consumer.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]

Reply via email to