GH-422 GH-606 Add support for normalizing structure-mode CE message
Normalizing in this context means converting it to binary-mode so the rest of the processing logic is the same. Added support for canonical attribute names. Now, internally any attribute can be set as 'ce_' regardless where it came from are where it goes to as the frameork will be able to recognize both Removed CloudEventMessageConverter Renamed CloudEventAttributes to CloudEventAttributesHelperas it is better suited to what it actually does
This commit is contained in:
@@ -21,7 +21,7 @@ import java.util.function.Function;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.function.cloudevent.CloudEventAttributes;
|
||||
import org.springframework.cloud.function.cloudevent.CloudEventAttributesHelper;
|
||||
import org.springframework.cloud.function.cloudevent.CloudEventAttributesProvider;
|
||||
import org.springframework.cloud.function.cloudevent.CloudEventMessageUtils;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -90,7 +90,7 @@ public class CloudeventDemoApplication {
|
||||
data.setVersion("2.0");
|
||||
data.setReleaseDateAsString("01-10-2006");
|
||||
|
||||
CloudEventAttributes ceAttributes = CloudEventMessageUtils.get(ceMessage.getHeaders())
|
||||
CloudEventAttributesHelper ceAttributes = CloudEventMessageUtils.get(ceMessage.getHeaders())
|
||||
.setSource("https://interface21.com/")
|
||||
.setType("com.interface21");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user