GH-1950 Add scst_targetDestination header

The core framework does nothing with this header other then defining it. One can always use StreamBridge for general cases

Resolves #1950
This commit is contained in:
Oleg Zhurakousky
2020-05-28 14:22:18 +02:00
parent 55ae6b087d
commit 52dad60337

View File

@@ -16,6 +16,7 @@
package org.springframework.cloud.stream.binder;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.integration.IntegrationMessageHeaderAccessor;
import org.springframework.messaging.MessageHeaders;
@@ -39,6 +40,18 @@ public final class BinderHeaders {
private static final String PREFIX = "scst_";
/**
* Indicates the name of the target destination the binder should use if they
* choose (or have capabilities) to optimize sending output messages to
* dynamic destinations.
* <br>
* <br>
* NOTE: The core framework only defines this header, but does nothing else.
* So it is up to binders to choose to support it or not. One can always rely on {@link StreamBridge}
* for general cases of sending output messages to dynamic destinations.
*/
public static final String TARGET_DESTINATION = PREFIX + "targetDestination";
/**
* Indicates the target partition of an outbound message. Binders must observe this
* value when sending data on the transport. This header is internally set by the