Closed
Description
Our handling of "raw" Pub/Sub events assumes there will always be data.message.attributes
here. This is the case when using the Pub/Sub emulator. It is not necessarily the case when integrating with the GCP Pub/Sub service and so an exception is thrown.
Here is a sample payload sent by Pub/Sub:
{
"message": {
"data": "ZGFzZmRzYWZkYXNm",
"messageId": "3390469820526936",
"message_id": "3390469820526936",
"orderingKey": "2",
"publishTime": "2021-11-16T19:21:09.107Z",
"publish_time": "2021-11-16T19:21:09.107Z"
},
"subscription": "projects/matts-clean-test-project/subscriptions/message-ordering-subscription"
}