Class JsonMergeAggregator

All Implemented Interfaces:
MessageAggregator

@ComponentProfile(summary="Merge each message into an existing JSON object.", tag="json") public class JsonMergeAggregator extends JsonAggregatorImpl
MessageAggregator implementation that merges each message to a JSON object or array.

The payloads from the collection are assumed to be JSON objects, and will be aggregated into the pre-split message be it an object or array. Messages that are not JSON objects will be ignored but an error will be thrown should the pre-split message not be valid.

In the adapter configuration file this class is aliased as json-merge-aggregator which is the preferred alternative to the fully qualified classname when building your configuration.

  • Field Details

    • mapper

      protected transient com.fasterxml.jackson.databind.ObjectMapper mapper
  • Constructor Details

    • JsonMergeAggregator

      public JsonMergeAggregator()
  • Method Details