Recent project requires integration with MQ. We need to modify one of the APIs from our application to integrate with client's application via MQ. The integration requires the following:
External system calls our API. Our API needs to be modified to:
1. Produce MQ message to create object
2. Consume MQ message to validate creation of object
3. If response from #2 was success, produce new MQ message to create secondary object
4. Consume MQ message to validate creation of secondary object
Can 1-4 be coded within a single program or would we need multiple consumer/producer programs? Any guidance in terms of how this should be architected would be greatly appreciated.