Subscriber Receives Irrelevant Events ​
Symptom ​
A subscriber receives events that do not match the types defined in its Subscription custom resource.
Cause ​
This issue occurs due to a naming collision after event type cleanup. To conform to Cloud Event specifications, Eventing modifies the event names to filter out prohibited characters. For details, see Event name cleanup.
Solution ​
To find the cleaned event type that the backend uses, check the status of the Subscription:
bashkubectl get subscription {SUBSCRIPTION_NAME} -n {NAMESPACE} -o jsonpath='{.status.types}'This command returns the mapping between the original type and the cleaned type. Note the cleanType value.
Search all Subscription resources in the cluster to see if another one uses the same cleaned type. Replace {CLEAN_TYPE} with the value from the previous step.
bashkubectl get subscriptions -A -o yaml | grep "cleanType: {CLEAN_TYPE}" -B 1If the output shows more than one Subscription with the same cleanType, you have a naming collision.
To fix the issue, modify the spec.types in one of the colliding Subscription resources and update the corresponding publisher to use a unique event type that does not cause a collision.