You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use your library to be able to run multiple pika subscribers/publishers in a flask app. I think I am not using the library right because once I run my code, I am not able to see the flask app started message on my console. Below is the code I wrote using your guidelines :
from flask import Flask
from flask_pika import Pika as FPika
app = Flask(__name__)
app.config['FLASK_PIKA_PARAMS'] = {
'host':'localhost', #amqp.server.com
'port': 5672, #amqp server port
'username' : 'guest',
'password' : 'guest',
'virtual_host':'vhost' #amqp vhost
}
app.config['FLASK_PIKA_POOL_PARAMS'] = {
'pool_size': 8,
'pool_recycle': 600
}
fpika = FPika(app)
ch = fpika.channel()
ch.basic_publish(exchange='daemon',routing_key='routing_key',exchange_type = 'fanout')
fpika.return_channel(ch)
if __name__ == "__main__":
app.run()
Could you please review this and tell me if this looks good or what is the problem here?
The text was updated successfully, but these errors were encountered:
Hello,
I am trying to use your library to be able to run multiple pika subscribers/publishers in a flask app. I think I am not using the library right because once I run my code, I am not able to see the flask app started message on my console. Below is the code I wrote using your guidelines :
Could you please review this and tell me if this looks good or what is the problem here?
The text was updated successfully, but these errors were encountered: