Sending Ack with multiple flows

Thanks for posting this question.
It is necessary for the application to track which messages belong to which flows when consuming from multiple flows on a non-transacted session. The most straightforward way to accomplish this is to create your own application object that contains both an IMessage reference and an IFlow reference.
When processing a received message in your messageEvent callback, instantiate your AppMessage object and save both the IFlow and IMessage there. In your app you would pass around and generally use AppMessage(), and when your ready to acknowledge, the IFlow reference you’ve saved can be used.
This would be the solution for non-transacted sessions.
An alternate approach, especially if the messages you are consuming are related and must be handled together is to create a ITransactedSession, then create your flows on the ITransactedSession instead. In those mode, all received messages are received in a transaction. You do not have to acknowledge individual messages, once you’ve received and processed both messages, simply call ITransactedSession.commit() to acknowledge both messages. With this approach you must use IFlow.ReceiveMsg() to consume messages on each flow as this is the only way to guaranteed which messages are being committed when commit() is called.
Ragnar