feat: Watermill integration, eventbus GoChannel migration, TLS fix#62
Open
markusnissl wants to merge 1 commit intomainfrom
Open
feat: Watermill integration, eventbus GoChannel migration, TLS fix#62markusnissl wants to merge 1 commit intomainfrom
markusnissl wants to merge 1 commit intomainfrom
Conversation
Introduce `infra/messaging/wmconvert` — a Watermill adapter package that enables any Watermill-supported broker (Kafka, NATS, Google Pub/Sub, SQL) to be used behind rho-kit's messaging interfaces. Includes bidirectional message conversion, PublisherAdapter, ConsumerAdapter, ConnectorAdapter, and a convenience Backend type. Migrate `runtime/eventbus` from custom handler map + worker pool to Watermill GoChannel backend while preserving all original semantics: sync/async handler distinction, sync error collection via errors.Join, bounded worker pool with drop semantics, Prometheus metrics, panic recovery, and context propagation (via GoChannel PreserveContext). Upgrade AMQP publisher to use watermill-amqp with channel pooling and confirm mode. Add custom Marshaler that handles non-string AMQP headers (x-death tables) by serializing to JSON metadata. Keep PublishRaw for dead-letter byte forwarding via direct amqp091-go. Fix TLS *tls.Config shared pointer mutation — clone before passing to amqp.DialTLS and http.Transport to prevent Go's TLS handshake from writing ServerName into a shared config. Fix release script: run `go mod tidy` after dependency version bumps in updateProjectDependencies to recompute go.sum checksums. Breaking changes: - eventbus async handlers now use GoChannel (JSON serialization overhead) - AMQP publisher uses watermill-amqp internally (separate connection)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #58 (was on wrong branch).
Summary
infra/messaging/wmconvertpackage — Watermill adapter layer enabling any Watermill provider (Kafka, NATS, Google Pub/Sub, SQL) behind rho-kit's messaging interfacesruntime/eventbusto GoChannel — async handlers via Watermill, sync handlers direct dispatch. All features preserved: sync/async split, bounded pool, metrics, context propagation.Clone()before passing toamqp.DialTLSandhttp.Transportgo mod tidyafter dependency version bumpsTest plan