I’m trying to make a AMQP integration layer for my app. This layer would only consume messages from my customer’s queues and the result would be a specific action in my application. My application is a type of CRM. It manages recipients and it can send emails to these recipients. What I would like my customers to be able to do is the following:
Through my application admin panel, a user would be able to input their AMQP connection information (host, port, username, etc.)
Once they have setup a connection, they would be able to add queues to this connection.
To add a queue, they would input the queue name and choose the desired action on the application. Example of these would be “Create a contact” or “Send X email”.
The application would then attempt to connect to the queue and grab a single message.
Upon successfully grabbing a message, it would map out the message fields and the user would be able to map these against the application data field.
Then they would choose the synchronisation setting. This would be either live data or pre configured setting such have “Every 5/10/15/30minutes”
This process would basically create a consumer for the customer’s queue that would feed my application with data. The possible callback for the consumers would be the different available ‘Actions’ the user can choose at step 3.
The necessary information would be stored in a database for my application to use whenever it needs to consume a message.
Does this sound right and / or do you see any issue with the above?
My main concern would be how to handle all the consumers this can potentially create? In the past, whenever I had to integrate a customer’s queue I would make a microservice that would consume a single queue and have the appropriate callback function. That is pretty straight forward but it would have been hard to maintain in the future as I add more queues and other customers since it clearly goes against the DRY principle.
Would it be best to handle this as a plugin or is it plausible to handle all these consumers within a single app?