i need to implement a rabbitMQ Consumer inside Strapi to read in messages and perform actions accordingly. usually i would just add some api endpoints to trigger the process, but in this case this would lead to a lot of problems with other systems.
the process i need to start includes loading data from multiple services, combining them and generating collection type entries with said data.
this process of synchronizing/creating/deleting entities can be initiated by multiple other services, which provide parts of the necessary data.
the case i try to cover using rabbitmq is the following:
systems A, B and C all need to start the process in a short span of time (around the range of 1 minute), all of them would trigger a sync inside strapi, which in turn would request data from all the systems and start generating/updating entities (at the current point around 1700 pages). to not brick strapi and the other services with high amounts of requests and data processing, i put a rabbit queue between strapi and the other system. the queue deduplicates messages so only one sync is triggered, when multiple system request a sync at the same time and i can lock the sync process in strapi to only have a single instance running at all times.
how would i add a consumer to strapi, that’s always running in the backend?