/** * Constructs a Message for the given {@code payload} and {@code meta data}. The given {@code metaData} is * merged with the MetaData from the correlation data of the current unit of work, if present. * * @param declaredPayloadType The declared type of message payload * @param payload The payload for the message * @param metaData The meta data for the message */ public GenericMessage(Class<T> declaredPayloadType, T payload, Map<String, ?> metaData) { this(IdentifierFactory.getInstance().generateIdentifier(), declaredPayloadType, payload, CurrentUnitOfWork.correlationData().mergedWith(MetaData.from(metaData))); }
/** * Constructs a Message for the given {@code payload} and {@code meta data}. The given {@code metaData} is * merged with the MetaData from the correlation data of the current unit of work, if present. * * @param declaredPayloadType The declared type of message payload * @param payload The payload for the message * @param metaData The meta data for the message */ public GenericMessage(Class<T> declaredPayloadType, T payload, Map<String, ?> metaData) { this(IdentifierFactory.getInstance().generateIdentifier(), declaredPayloadType, payload, CurrentUnitOfWork.correlationData().mergedWith(MetaData.from(metaData))); }
/** * Constructs a Message for the given {@code payload} and {@code meta data}. The given {@code metaData} is * merged with the MetaData from the correlation data of the current unit of work, if present. * * @param declaredPayloadType The declared type of message payload * @param payload The payload for the message * @param metaData The meta data for the message */ public GenericMessage(Class<T> declaredPayloadType, T payload, Map<String, ?> metaData) { this(IdentifierFactory.getInstance().generateIdentifier(), declaredPayloadType, payload, CurrentUnitOfWork.correlationData().mergedWith(MetaData.from(metaData))); }