herywang opened a new issue, #889:
URL: https://github.com/apache/rocketmq-clients/issues/889
### Programming Language of the Client
Python
### Is Your Feature Request Related to a Problem?
There are some problems with using a traditional method to start a
background thread consumer in our program, such as this code snippet:
```python
import threading
def start_consumer():
# Refer to simple_consumer_example.py to create a simple consumer
# Starting a background consumer:
t = threading.Thread(target=start_consumer)
t.start()
```
Using the above writing method, you will get the following error message in
your `~/logs/rocketmq_python/rocketmq_client.log`
such as: `update topic route error, topic: xxxxxx, 'NoneType' object has no
attribute 'encode'`
such as: `subscribe exception: 'NoneType' object has no attribute 'encode'`
such as: `There is no topic to receive the message`
### Describe the Solution You'd Like
I will submit an example to start a simple rocketmq consumer in a background
thread.
### Describe Alternatives You've Considered
Using `asyncio` to start a backgroun consumer to resolve above error.
### Additional Context
_No response_
--
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]