Skip to content

feat(pubsublite): add GMK Implementation changes#14466

Merged
brownsuga918 merged 8 commits into
googleapis:mainfrom
brownsuga918:pubsublite-changes
Jun 4, 2026
Merged

feat(pubsublite): add GMK Implementation changes#14466
brownsuga918 merged 8 commits into
googleapis:mainfrom
brownsuga918:pubsublite-changes

Conversation

@brownsuga918

Copy link
Copy Markdown
Contributor

No description provided.

@brownsuga918 brownsuga918 requested review from a team as code owners April 21, 2026 22:07
@product-auto-label product-auto-label Bot added the api: pubsublite Issues related to the Pub/Sub Lite API. label Apr 21, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for Google Managed Kafka (GMK) as an alternative backend for Pub/Sub Lite, adding a new KafkaPublisher implementation and associated utilities. A critical issue was identified where a package name mismatch in internal/wire/publisher.go will cause compilation errors. Additional feedback suggests refining error handling to prevent client termination on message transformation failures, preserving nanosecond precision for event times, and adhering to best practices by avoiding http.DefaultClient and optimizing Kafka producer throughput.

Comment thread pubsublite/internal/wire/publisher.go Outdated
Comment thread pubsublite/internal/wire/publisher.go Outdated
Comment thread pubsublite/internal/wire/kafka_publisher.go Outdated
Comment thread pubsublite/pscompat/gmk_utils.go
Comment thread pubsublite/pscompat/gmk_utils.go Outdated
@brownsuga918 brownsuga918 force-pushed the pubsublite-changes branch 4 times, most recently from f5a6900 to 9226c2d Compare April 22, 2026 01:45
@brownsuga918 brownsuga918 requested a review from johnjcasey May 1, 2026 17:23
Comment thread pubsublite/internal/wire/kafka_publisher.go
Comment thread pubsublite/internal/wire/kafka_publisher.go
Comment thread pubsublite/pscompat/kafka_admin.go
Comment thread pubsublite/pscompat/kafka_migration.go Outdated
Comment thread pubsublite/pscompat/kafka_migration.go
@brownsuga918 brownsuga918 requested a review from johnjcasey May 15, 2026 04:27
@brownsuga918 brownsuga918 requested a review from pradn June 2, 2026 18:44
Ensure Sarama producer and consumer configurations are correctly set up for Google Managed Kafka before constructing clients.

Addresses feedback from @johnjcasey regarding Sarama producer validation.
Refactor KafkaPublisher locking to address feedback from @johnjcasey regarding excessive mutex usage.

- Convert status to atomic.Int32, eliminating mutex from Start, Stop, and Publish.
- Add inFlight WaitGroup to guard against a race where Stop could close the Sarama producer while a Publish send was in progress.
- Retain errMu strictly for guarding the error field.
Add explicit documentation and runtime logging warnings to KafkaAdminClient.IncreasePartitions to clarify that Kafka does not automatically rebalance existing data when partition counts grow, and that per-key ordering guarantees may be broken as key hashing adapts to the new partition layout.
Update MigrateOffsets documentation to inline the 5-step offset migration algorithm rather than referencing an external design document, ensuring long-term readability and self-contained package documentation.
Fix doc comment indentation in kafka_migration.go to satisfy goimports.
@brownsuga918 brownsuga918 requested a review from noahdietz June 2, 2026 22:16
@noahdietz noahdietz removed their request for review June 2, 2026 22:35
@brownsuga918 brownsuga918 merged commit 50a5550 into googleapis:main Jun 4, 2026
19 checks passed
hongalex pushed a commit that referenced this pull request Jul 6, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.9.0](pubsublite/v1.8.2...pubsublite/v1.9.0)
(2026-07-06)


### Features

* Enable open telemetry attrs
([#14426](#14426))
([74eab64](74eab64))
* **pubsublite:** Add GMK Implementation changes
([#14466](#14466))
([50a5550](50a5550))


### Bug Fixes

* **pubsublite:** Reduce pscompat BufferedByteLimit
([#14234](#14234))
([e768524](e768524)),
closes
[#14237](#14237)


### Reverts

* Release pubsublite 2.0.0
([#19998](#19998))
([#20006](#20006))
([d7b7078](d7b7078))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsublite Issues related to the Pub/Sub Lite API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants