pub async fn queue_consume(
    tenant: String,
    rabbitmq: LapinPool,
    _postgresql: DBPool,
    mongodb: MongoClient,
    _redis: RedisClient
) -> Result<(), Box<dyn Error>>
Expand description

Primary entry point for the consuming of messages from the message broker.

Note

This procedure contain A LOT of unwrap’s. This is by design. This procedure is supposed to run asynchronously for each queue that is supposed to be listened to by the DISPATCH service, and by tenant as well. If any step on this fails, the listener should also fail, and maybe be restarted.