Python Forum

Full Version: A question regarding to the microservice architecture
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone
i have a microservice which exposes a few endpoints, each of these endpoints can be executed by a http request(flask).
I have one specific endpoint which takes a long time to be end, so I thought to run a background job once this entrypoint is triggered, in order to reduce its respond time.
Is it good practice to mix flask and rabbitmq in the same microservice?
For example, i want flask to expose this action but when it is called i want to push a task into a rabbit queue.. is the consumer should be in the same app or in a different service?
I would
Like to hear your recommendations.