Java MQ provides two methods for handling large messages: message sharding and message grouping. Message sharding and message grouping are common methods used in programming for handling large messages in Java MQ. The appropriate method to use depends on actual needs. If a big message needs to be divided into a batch of small messages with practical business significance, then message grouping is more appropriate; On the contrary, if the big message cannot be divided into small messages with practical business significance, then message fragmentation is used.