The main question doesn't give the idea of the problem, so here I am explaining it.
The task is to divide the objects belonging to a family (based on some relationship) and passing them as JMS messages for a process to act upon. All in the family should be processed together.
Now the family group can get bigger. so the question. Is there any other approach which will not have the issue which I have listed.
Theoretically the message size is limited by JVM heap size only. But I do not think it is a good practice to send too big messages. I'd say if your message is bigger than 10K, re-think your design.
If you really have to send a lot of data with your message probably better solution is to store data in DB and send ID of the main entity with the message, so the other side will be able to retrieve data it needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With