Is your feature request related to a problem? Please describe.
currently I'm trying to do batch fetch from pubsub, transform, then insert to bigquery.
but the pubsub library spawns a goroutine for each message, this causes bunch of memory consumption and inefficient processing
func (s *Subscription) Receive(ctx context.Context, f func(context.Context, *Message)) error {
Describe the solution you'd like
I need batch processing something like this
func (s *Subscription) ReceiveN(ctx context.Context, n items, f func(context.Context, []*Message)) error {
Describe alternatives you've considered
taking out the pubsub library and write own proper batch processing
Additional context
by doing this, it would be super efficient to do batch processing
Is your feature request related to a problem? Please describe.
currently I'm trying to do batch fetch from pubsub, transform, then insert to bigquery. but the pubsub library spawns a goroutine for each message, this causes bunch of memory consumption and inefficient processing
Describe the solution you'd like
I need batch processing something like this
Describe alternatives you've considered
taking out the pubsub library and write own proper batch processing
Additional context
by doing this, it would be super efficient to do batch processing