Add event-correlator gateway plugin#20
Open
raphael-solace wants to merge 3 commits into
Open
Conversation
A SAM Gateway plugin that correlates events from N source systems by a shared key (orderId, tradeId, etc.) and triggers a downstream agent via A2A when configurable conditions are met. Features: - Configurable source systems with topic subscriptions - Correlation key extraction via JSON path or topic position - Two built-in trigger rules: all-sources-present and immediate-on-source - Pluggable state store (in-memory / Redis) - Idempotent trigger evaluation - Output publishing to configurable Solace topics - 45 unit and integration tests Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a third state store option (`type: "database"`) that uses SAM's built-in CacheService with SQLAlchemy (PostgreSQL/SQLite). This lets the correlator persist state using the same database infrastructure as SAM without requiring a separate Redis deployment. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Standalone script that starts the correlator with a real Solace broker, publishes test events, and verifies both trigger rules fire correctly. Run with: python tests/e2e_local_test.py Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
Summary
A new Gateway Plugin that correlates events from N source systems by a shared key (
orderId,tradeId,requestId, etc.) and triggers a downstream agent via A2A when configurable conditions are met.Use cases
Features
all_sources_present: fire when every configured source has publishedimmediate_on_source: fire immediately on a specific source/topic pattern (e.g., change events)BaseGatewayComponentfollowing the same pattern assam-event-mesh-gatewayArchitecture
Test plan
pytest)ruff check)BaseGatewayApp+BaseGatewayComponentclass hierarchy)submit_a2a_task()invokedconfig.yamlexample makes sense for your use case🤖 Generated with Claude Code