Enhanced Streams Errors and Reconnects
Common status codes
| Code | Cause | Your action |
|---|---|---|
UNAUTHENTICATED | Missing or invalid key | Replace the credential |
PERMISSION_DENIED | Topic blocked by account access | Review plan access |
NOT_FOUND | Topic name does not exist | Call ListTopics |
RESOURCE_EXHAUSTED | Stream or traffic limit reached | Close unused streams |
UNAVAILABLE | Temporary transport failure | Reconnect with backoff |
INTERNAL | Processing failure | Retry once, then log details |
Reconnect
Enhanced Streams do not accept an offset in SubscribeRequest.
After a disconnect:
- Wait with exponential backoff and jitter.
- Call
ListTopicsafter aNOT_FOUNDresponse. - Open a new subscription.
- Deduplicate events in your storage layer.
- Alert after repeated failures.
Deduplicate
Store these envelope fields:
topicpartitionoffsettimestamp_ms
Use a unique database key over topic, partition, and offset.
Parse JSON once
Python protobuf clients return payload as bytes.
python
event = json.loads(message.payload)JavaScript proto loaders often return a Buffer.
javascript
const event = JSON.parse(message.payload.toString("utf8"))Do not base64-decode either value.