-
Notifications
You must be signed in to change notification settings - Fork 616
Description
Describe the bug
SNS messages created by the IntegrationSink (sns option) are missing core Cloud Event attributes (id
, type
, subject
, time
, etc.). Extension attributes, on the other hand, are preserved.
Expected behavior
The MessageAttributes of the produced SNS message should contain all Cloud Event attributes.
To Reproduce
Use the IntegrationSink with the sns
option.
Knative release version
v0.19.0
Additional context
The HTTP headers by default have the CamelCloudEvent
prefix for core attributes, and the Ce-
prefix for extension attributes, e.g.
CamelCloudEventID=2d07a084-e0d0-4bc9-9724-8bcff8360f5a
CamelCloudEventSource=https://10.100.0.1:443
CamelCloudEventSubject=/apis/apps/v1/namespaces/foo/deployments/bar
CamelCloudEventTime=2025-09-15T15:20:30.182762705Z
CamelCloudEventType=dev.knative.apiserver.resource.delete
CamelCloudEventVersion=1.0
CamelHttpMethod=POST
CamelHttpPath=
CamelHttpQuery=null
CamelHttpUri=/
Ce-Apiversion=apps/v1
Ce-Kind=Deployment
Ce-Knativearrivaltime=2025-09-15T15:20:30.183022734Z
Ce-Name=bar
Ce-Namespace=foo
Content-Length=10929
Content-Type=application/json
Host=cluster-events-log-sink-service.events.svc.cluster.local
Kn-Namespace=events
Prefer=reply
User-Agent=Go-http-client/1.1
The apiversion
, kind
, knativearrivaltime
, name
, and namespace
extension attributes all appear the SNS MessageAttributes, but the id
, source
, subject
, time
, and type
do not.
I believe the core attributes are filtered because the Sns2HeaderFilterStrategy filters out any headers that start with Camel
, which includes not only internal headers like the CamelHttp* headers, but the CamelCloudEvent* headers as well.
It's possible that the sink needs to be configured with a CloudEventHttpDataTypeTransformer to convert those header names to their ce-*
equivalents before being handed off to the SNS logic, but I have not studied the code enough to be 100% sure.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status