Merged
Conversation
…ration handling - Updated JsonTranslator to use JsonValue type for serialization and deserialization. - Introduced JsonValue type in types.py for better JSON structure representation. - Enhanced Event class to use JsonValue for data field and updated serialization logic. - Modified tests to ensure original headers are preserved and sensitive information is redacted in dead letter queue. - Refactored retry logic to use calculate_backoff function from resilience package. - Added comprehensive tests for messaging registry and configuration validation. - Implemented memory broker tests to ensure bounded history and proper message handling. - Improved error handling in configuration and registry to reject invalid settings. - Ensured that optional broker SDKs are not imported unless explicitly registered.
This was referenced May 4, 2026
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… NATS consumer callback logic
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Description
Rework
pykit-messagingaround a clean core registry plus opt-in Kafka, NATS, and RabbitMQ adapters. Core imports stay dependency-light, while adapter modules own their SDK imports, protocol config, validation, redaction, and lifecycle behavior.Motivation
Applications should be able to use in-memory or core messaging without installing broker SDKs or inheriting Kafka-specific assumptions. This matches the cache/storage optional-adapter pattern and keeps adapter choices explicit at the application boundary.
Type of Change
Package(s) Affected
pykit-messagingpykit-resilienceChanges Made
Sink[Message]and consumers compose asStream[None, Message].Testing
uv run pytest)uv run ruff check packages/)uv run mypy packages/)uv run lint-imports)Test Evidence
Breaking Changes
Messaging adapter setup now uses explicit adapter registration and adapter-specific config types. Code that imported Kafka behavior from the core package should import/register the adapter module instead.
Sibling Parity
Parity is implemented in the matching Go and Rust PRs. Go PR: kbukum/gokit#137; Rust PR: kbukum/rskit#137
Checklist
uv lockand committeduv.lockif dependencies changed[Unreleased]Additional Notes
Review focus: optional import boundaries, adapter config validation, provider-shape bridge behavior, and the shared DLQ/retry behavior reused by Kafka/NATS/RabbitMQ.