Restructure Cloud Events support to optionally support Cloud Events SDK
This commit is contained in:
@@ -33,7 +33,6 @@ import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.cloud.function.cloudevent.CloudEventMessageUtils;
|
||||
import org.springframework.cloud.function.context.catalog.FunctionTypeUtils;
|
||||
import org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry.FunctionInvocationWrapper;
|
||||
import org.springframework.cloud.function.context.message.MessageUtils;
|
||||
@@ -218,10 +217,10 @@ public class RequestProcessor {
|
||||
}
|
||||
|
||||
private boolean isValidCloudEvent(Set<String> headerKeys) {
|
||||
return headerKeys.contains(CloudEventMessageUtils.HTTP_ATTR_PREFIX + CloudEventMessageUtils.ID)
|
||||
&& headerKeys.contains(CloudEventMessageUtils.HTTP_ATTR_PREFIX + CloudEventMessageUtils.SOURCE)
|
||||
&& headerKeys.contains(CloudEventMessageUtils.HTTP_ATTR_PREFIX + CloudEventMessageUtils.TYPE)
|
||||
&& headerKeys.contains(CloudEventMessageUtils.HTTP_ATTR_PREFIX + CloudEventMessageUtils.SPECVERSION);
|
||||
return headerKeys.contains("ce-id")
|
||||
&& headerKeys.contains("ce-source")
|
||||
&& headerKeys.contains("ce-type")
|
||||
&& headerKeys.contains("ce-specversion");
|
||||
}
|
||||
|
||||
// this seem to be very relevant to AWS container tests
|
||||
|
||||
Reference in New Issue
Block a user