I want some thing like Order record of Id with 1 and 2 into one file order Id with 2, 3 into second file and last order into third file.
I tried to implement position function but somehow that's not working for me.
CodePudding user response:
U can use the document and envelop schemes and set the body xpath and set the count 2 in the document schema .. this way the receive pipeline with XML disassembler will split the messages.
if you need more logic in splitting u can loop them in an Orchestration or Map using a group by XSLT.
CodePudding user response:
Usually when there is a requirement to debatch and then rebatch, you either need to use a scatter gather pattern, which can be quite complex to implement
or
I tend to use a database table, I just insert all the records there, then have a separate process that polls that table using a stored procedure that then returns a payload contain the rebatched records.