-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
Description
When converting CloudEvents to legacy events, a legacy pubsub CloudEvent has type
attribute "google.cloud.pubsub.topic.v1.messagePublished"
. This can be converted to a legacy event eventType
as
google.pubsub.topic.publish
providers/cloud.pubsub/eventTypes/topic.publish
(deprecated).
Similarly, the CloudEvent source
attribute e.g. //pubsub.googleapis.com/projects/sample-project/topics/gcf-test
can be converted into a legacy event resource
as
- structured format:
{
"service":"pubsub.googleapis.com",
"name":"projects/sample-project/topics/gcf-test",
"type":"type.googleapis.com/google.pubsub.v1.PubsubMessage"
}
- raw path:
projects/sample-project/topics/gcf-test
(deprecated).
(This is also the case for legacy storage events.)
- Is this reasonable to always convert to the non-deprecated format? User's function might still depend on the deprecated format.
- Is there a way to distinguish CloudEvents for legacy pubsub/storage and CloudEvents for normal pubsub/storage?