You can use the Collector node in a message flow to generate a message collection.
Read the concept topic about message collections.
You can use a Collector node to group together related messages from one or more sources, into a single message known as a message collection. The messages are added to the message collection based on conditions that you configure in the Collector node. The message collection can then be routed for further processing to other nodes in the message flow. You can also build a message collection manually using a Compute node or JavaCompute node.
See the following topics for instructions on configuring message flows to generate message collections:
The Collector node sample demonstrates the use of the Collector node for message collection.