Answer the question
In order to leave comments, you need to log in
How to listen to the response from rabbitmq from the front?
Stack:
python/fastapi
html5/css
rabbitmq (pika)
There is a simple logic for two users to interact. The first user sends an invitation to the second who either accepts or rejects it. The response is sent to the first user. Sending occurs from the form where, when submitting, the message is transferred to the rabbit's queue. The question is, which library can be used to display an incoming request in real time?
The request and the response to it are planned to be recorded in the database. It is possible to read a line with the accepted/decline status from the database and display it, but for this you need to refresh the page to get the update. I think this option is suitable when a person logs in to the site, but not when he is online.
Please share your experience on how best to implement such a connection?
Answer the question
In order to leave comments, you need to log in
what library can be used to display incoming request in real time?With SSE , you can send some data to the client without having to refresh the page.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question