Cloud Pub/sub Message Pull from the topic

In one of the project requirement, I have to push all the payloads which didn't go through the success flow in the proxy or integrations to a topic for a retry attempt later. I use this url to fetch the messages:

https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/pull

I have 2 observations when I pull the messages, hence below questions:
1. If I give maxMessages as 5 , then the number of messages in response is not consistent . It changes every time. I want to understand this behaviour and how it works.
2. The response is base 64 encoded. Decoding all the messages to find one particular for reprocessing is difficult. Is there any way to achieve the exact message from the topic by using the same above api?

Could you please help @dchiesa1 @dknezic @strebel 

 

 

2 0 95
0 REPLIES 0