See comments inline... Rick Block wrote:
Perhaps this is more of a JBI than a ServiceMix question, but is there a standard JBI mechanism to implement an in-out* MEP in which a consumer sends a request that elicits a series of responses, one of which is marked as final? As far as I can tell, there are two issues with this: 1) how is a session created such that a series of messages resulting from an initial request can be correlated with this request? JBI does not have any notion of session. Correlation may be done using the xml content (using an xpath expression, as a BPEL engine will do) or a property on the exchange. Each JBI exchange as a unique ID that you can use to correlate messages: if your component put the input message id in a property on the output messages, you will be able to correlate. 2) how does the provider ensure the NMR routes the series of responses to the correct consumer? ServiceMix does not support in-out-* type of MEP, but you should be able to achieve this using several JBI exchanges. For example, the consumer could send an in-only message containing the data along with its own JBI endpoint (service name + endpoint name). Then the provider would send several in-only exchanges to the given endpoint. The consumer would be responsible for correlating messages. You could set a given property on the last exchange to say it is the last one, or on each message, set properties for the total number of responses, and the index of the current exchange. I understand the ServiceMix WS-Notification package may be useful, but are there standard "pure" JBI mechanisms for doing this? WS-Notification is about publish and subscribe, not correlation, so I 'm not really sure it will help you in this case. We do need some king of generic and reusable aggregator, so that such problem can be easily solved, but we do not have any yet .... -- all contributions are welcome :) Cheers, Guillaume Nodet
