You could split this service to 2 separate services:
1) Load all messages of both types to database tables.
2) Select required data set and map it to outgoing message.
As for performance, I think it would be faster then looping messages inside orchestration.
↧
Looping messages
↧