JMS itself has no support for "message segmentation." However, JMS implementations can implement functionality which goes beyond the specification. For example, ActiveMQ Artemis supports arbitrarily large messages whereby it takes a single, large message and breaks it up into chunks which it streams over the wire and onto disk so that the message is never held in memory at once. Of course, all this is done behind the scenes. The client application just works with the JMS API like it normally would.
Now, if you wanted to break the large message up manually and send it as many smaller, individual JMS messages then I could see where message grouping would help in reassembling the message because each message in the group would be consumed serially by a single consumer. However, it's also possible that the consumer might fail part-way through consuming the whole group so you'll need to ensure you consume all the messages in the group before you acknowledge any of them otherwise you risk losing pieces of the large message which you can never get back. In any case, the consumer will have to know how to reassemble the message once it gets all the pieces together but that could be as simple as appending the bytes of each message in order into a buffer.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…