Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

Emit close/reconnect events on StreamConnections #529

@CJxD

Description

@CJxD

A screenshot that you have tested with "Try this API".

N/A

What would you like to see in the library?

When using the managedwriter StreamConnection class (as returned by WriterClient.createStreamConnection()), I found that the connection often needs to reconnect, but my calling code is unable to determine when this happens.

I need to do this because the protoDescriptor needs to be specified for the first write in a connection, but not for subsequent writes, so I need to reset my state to know if I need to write the protoDescriptor again.

Describe alternatives you've considered

My workaround hack was to do (stream as any)._connection.on('close', ... and to reregister the listener every time the connection changes, but it would be great to listen to an event directly.

Additional context/notes

No response

Metadata

Metadata

Assignees

Labels

api: bigquerystorageIssues related to the googleapis/nodejs-bigquery-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions