Is your feature request related to a problem? Please describe.
There is no PubSub proto message for the incoming push subscription messages described here. And thus, anyone who'd like to receive a Protobuf equivalent of the push message has to create its own proto wrapper around specified JSON representation.
Describe the solution you'd like
It'd be great to have an appropriate Protobuf message equivalent for the defined JSON representation:
{
"message": {
"attributes": {
"key": "value"
},
"data": "SGVsbG8gQ2xvdWQgUHViL1N1YiEgSGVyZSBpcyBteSBtZXNzYWdlIQ==",
"messageId": "136969346945"
},
"subscription": "projects/myproject/subscriptions/mysubscription"
}
Describe alternatives you've considered
I'm currently using my own Proto definition:
syntax = "proto3";
package google.pubsub.v1;
option java_multiple_files = true;
option java_outer_classname = "PubsubPushProto";
option java_package = "com.google.pubsub.v1";
import "google/pubsub/v1/pubsub.proto";
message PubsubPushNotification {
// Pubsub message.
PubsubMessage message = 1;
// The name of the Pubsub subscription that pushed the current notification.
// Format is `projects/{project}/subscriptions/{subscription}`.
string subscription = 2;
}
Additional context
I'm currently using such a Protobuf as an input parameter for Spring's RestController POST handler. The conversion is done with the help of com.google.protobuf.util.JsonFormat.Parser class.
Is your feature request related to a problem? Please describe.
There is no PubSub proto message for the incoming
pushsubscription messages described here. And thus, anyone who'd like to receive a Protobuf equivalent of the push message has to create its own proto wrapper around specified JSON representation.Describe the solution you'd like
It'd be great to have an appropriate Protobuf message equivalent for the defined JSON representation:
Describe alternatives you've considered
I'm currently using my own Proto definition:
Additional context
I'm currently using such a Protobuf as an input parameter for Spring's RestController
POSThandler. The conversion is done with the help ofcom.google.protobuf.util.JsonFormat.Parserclass.