Open dengshaochun opened 1 year ago
I'm new to celery. Could you explain how to run the script you provided?
It cannot be fully reproduced, but the online environment has always been problematic. The test of a separate celery + pulsar code is normal. At present, there is no idea. The online environment reports the following errors:
p._producer = self._client.create_producer(topic, conf)
_pulsar.TopicNotFound: Pulsar error: TopicNotFound
0000-00-00 00:00:00.000 WARN [0000-00-00 00:00:00.000 ERROR [0000-00-00 00:00:00.000 WARN [0000-00-00 00:00:00.000 ERROR [0000-00-00 00:00:00.000 WARN [0000-00-00 00:00:00.000 ERROR [0000-00-00 00:00:00.000 INFO [0000-00-00 00:00:00.000 ERROR [0000-00-00 00:00:00.000 INFO [0000-00-00 00:00:00.000 INFO [0000-00-00 00:00:00.000 INFO [0000-00-00 00:00:00.000 INFO [0000-00-00 00:00:00.000 INFO [0000-00-00 00:00:00.000 INFO [0000-00-00 00:00:00.000 INFO [0000-00-00 00:00:00.000 INFO [0000-00-00 00:00:00.000 INFO [0000-00-00 00:00:00.000 INFO [0000-00-00 00:00:00.000 INFO [0000-00-00 00:00:00.000 INFO [0000-00-00 00:00:00.000 INFO [
The online environment only has problems when calling celery.delay, and there will be no exception when calling the function directly,as follows
# ok
mock_data2pulsar(cnt=1000)
# exception
mock_data2pulsar.delay(cnt=1000)
debug pulsar/__init__.py
print topic
and conf
before p._producer = self._client.create_producer(topic, conf)
looks ok
Hi @dengshaochun. I tried to reproduce the bug but the code works. There are suspicions that the problem is in the name of topic.
Here my example: https://github.com/gromsterus/issues-sandbox/tree/main/pulsar-client-python-150
I use persistent://public/default/test-celery
.
If you provide the complete code with celery initialization it will be easier to help 🤝
python: 3.6 pulsar-client: pulsar-client[avro]==2.10.2 celery: 5.1.2
code example:
an exception occurred at: