'JMS with Consumer performing long running process (10mins)
I have a scenario in Spring boot applications - where I will be getting requests from other applications via REST "Run Process" Service and these will be placed on MQ queues. Then consumers will process one by one and the consumer calls another REST "Initiate Request" service which will take around 10mins to get a response back. I am looking for ideas/solutions where I can fire the REST "Initiate Request" service and forget then stop the consumer. Once "Initiate Request" completes its processing, the system will send an event notification indicating this process has completed/failed. Based on this I would like to proceed with the next Queue item. Is there a way to Stop and Start consumers based on notification to avoid long-running threads? If you have come across this problem, let me know how you have resolved it. There are other solutions like
- Consumers to persist the data to database and process row by row.
- Using webflux we can avoid JMS-Consumer thread but not consumer calling REST
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
