-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Singleton Pulsar Producer Using Python Client Not Working #214
Comments
I would print the content of |
@merlimat I can see the log |
Then the other explanation would be that the IP of your VM in AWS is not reachable. You can also enable debug logging with, configuring the log level in the pulsar client instance: see https://pulsar.apache.org/api/python/3.5.x/pulsar.ConsoleLogger.html |
@merlimat The strange part is I call PULSAR_PRODUCER.is_connected it logs me True but not sure why it is not able to send a message to PULSAR. |
try enabling debug logs, it should give more clarity of where it gets stuck |
@merlimat Tried with enabling the internal logs, but I can't see any useful information. |
This is the last sending message immediately and right after that it stucks and nothing happens and no logs. |
I'm struggling with creating a singleton Apache Pulsar producer in a Django app. I have a Django application that needs to produce hundreds of messages every second. Instead of creating a new producer every time, I want to reuse the same producer that was created the first time.
The problem I'm facing is that the producer gets successfully created, I can see the logs. but if I try to send a message using the producer, it gets stuck without any error. Below is my code for creating the producer.
I'm importing it in one of the utility files that runs at the startup of the application. Below is the code for calling:
The above code works fine on my local setup, but when the same code is deployed on production (i.e., AWS ECS), it doesn't work. If I SSH into the Docker container and then run a Python shell and try to import PULSAR_PRODUCER, it shows as None. Please suggest what I might be missing, as I'm really stuck in understanding.
I have created the same issue on stackoverflow as well,
https://stackoverflow.com/questions/78526293/singleton-pulsar-producer-using-python-client-not-working
The text was updated successfully, but these errors were encountered: