I have a camel application which receives a json array request from a jms queue upto size 13000,the structure of the json array request is as below. I would like to stream and split the json array with a group of 5. For example if I receive a json array of size 100 I would like to group as 5 and split it as 20 requests. Is there a inbuilt camel functionality to group and split json array or do I need to write a custom splitter?
I'm using camel 2.17 version.
Sample json array:
[{
"name": "Ram",
"email": "ram@gmail.com",
"age": 23
}, {
"name": "Shyam",
"email": "shyam23@gmail.com",
"age": 28
}, {
"name": "John",
"email": "john@gmail.com",
"age": 33
}, {
"name": "Bob",
"email": "bob32@gmail.com",
"age": 41
}, {
"name": "test1",
"email": "test1@gmail.com",
"age": 41
}, {
"name": "test2",
"email": "test2@gmail.com",
"age": 41
}, {
"name": "test3",
"email": "test3@gmail.com",
"age": 41
}, {
"name": "test4",
"email": "test4@gmail.com",
"age": 41
}]