Skip to content

feat(@golevelup/nestjs-google-cloud-pubsub): schema validation via validateMessage API, optional peer deps - #1257

Open
chaikin-nikita wants to merge 7 commits into
golevelup:masterfrom
chaikin-nikita:feat/pubsub-schema-validation-optional-deps
Open

feat(@golevelup/nestjs-google-cloud-pubsub): schema validation via validateMessage API, optional peer deps#1257
chaikin-nikita wants to merge 7 commits into
golevelup:masterfrom
chaikin-nikita:feat/pubsub-schema-validation-optional-deps

Conversation

@chaikin-nikita

Copy link
Copy Markdown
Contributor
  • Schema validation now uses GCP validateMessage API instead of comparing raw schema definitions
  • avsc and @protobuf-ts/runtime are now optional peer dependencies
  • Removed maxWaitTimeInMillis from batchManagerOptions — wait time is auto-derived from maxMessages
  • Fixed flush() to correctly wait for all p-limit queued tasks before resolving
  • Fixed protobuf stub generation for repeated and map fields
  • ResourceManager added for event loop / heap / GC monitoring (flow control actuator deferred to a future release)

chaikin-nikita and others added 6 commits August 9, 2026 13:00
… optimize batching

- Added ResourceManager with hysteresis logic for resource monitoring. \- Refactored BatchManager to
use a flat structure. \- Optimized PubsubClient deserialization with a unified method. \-
Implemented poison message handling on serialization errors.
…schema, optional avsc/protobuf

1. Message validation based on schema instead of comparing raw schemas. 2. Avsc and
@protobuf-ts/runtime are optional now and needed only if used. 3. Avro payload type inference
optimization

BREAKING CHANGE: protoPath field was removed from pubsub protocol buffer topic configuration
Added resource manager. Added adaptive flow control. Publisher provider currently optional
…aitTimeInMillis

Removed protoPath and maxWaitTimeInMilliseconds fields
…const enum, schema client

- flush() now checks limiter.pendingCount to avoid resolving before p-limit queued tasks start
- protobuf stub generation handles repeated and map fields correctly
- const enum ScalarType replaced with enum in vendored .d.ts for isolatedModules compatibility
- removed adaptive flow control actuator (ResourceManager stays, actuator redesign deferred)
- simplified PubsubSchemaClient lazy init to single _schemaClientPromise field
- deduplicated ack/nack settle loops in attachBatchHandler
- updated docs: optional peer deps installation, removed stale future features

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… release

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@chaikin-nikita
chaikin-nikita force-pushed the feat/pubsub-schema-validation-optional-deps branch from 3fb1ba4 to 47091ea Compare August 9, 2026 11:01
…ix Jest resolution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant