@FunctionalInterface public interface CloudEventHeaderEnricher
CloudEventMessageBuilder may or may not be initialized
with default values, so it is the responsibility of the user to ensure that all required Cloud Events
attributes are set. That said, Spring frameworks which utilize this interface
will ensure that the provided CloudEventMessageBuilder is initialized with default values, leaving
you responsible to only set the attributes you need.
@Bean
public CloudEventHeaderEnricher cloudEventHeaderEnricher() {
return headers -> {
return headers.setSource("https://interface21.com/").setType("com.interface21");
};
}
| Modifier and Type | Method and Description |
|---|---|
CloudEventMessageBuilder<?> |
enrich(CloudEventMessageBuilder<?> messageBuilder)
Will provide access to an open instance of
CloudEventMessageBuilder so you
can add additional attributes and headers. |
CloudEventMessageBuilder<?> enrich(CloudEventMessageBuilder<?> messageBuilder)
CloudEventMessageBuilder so you
can add additional attributes and headers.messageBuilder - open instance of CloudEventMessageBuilderCloudEventMessageBuilderCopyright © 2023 Pivotal Software, Inc.. All rights reserved.