We already discussed that we split the
order into order items and send individual messages corresponding to each item to
different inventory modules. Now, before we can return back the order validation
message to the customer we need to examine the validation status of each order item
from the inventory modules. One possible configuration is to use an aggregator to
which all the inventory modules can route the individual order item status messages.
The aggregator, when it receives the status messages from all the related order items,
can evaluate the overall status and send back the decision (confirmed order or error).
This is shown in the following figure:
Sample Use Case
The sample use case will have the following components:
Default ServiceMix client: The default ServiceMix client will send several
In-Only messages to the split aggregator configured in the ESB. Each of these
messages is correlated, and they also carry the splitCount and splitIndex
along with their message properties.
Split aggregator: The split aggregator is a servicemix-eip component. On
receiving the in messages, the aggregator will look at the correlation ID,
splitCount, and splitIndex and can rearrange and aggregate the messages
irrespective of the order in which the messages arrive.
Pages:
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444