Skip to content

feat: redis-based cas broker#16

Merged
massiveio merged 3 commits into
masterfrom
feature/develop
Aug 27, 2025
Merged

feat: redis-based cas broker#16
massiveio merged 3 commits into
masterfrom
feature/develop

Conversation

@cloorc
Copy link
Copy Markdown
Collaborator

@cloorc cloorc commented Aug 27, 2025

No description provided.

Signed-off-by: Cloorc <wittcnezh@foxmail.com>
Copilot AI review requested due to automatic review settings August 27, 2025 07:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a Redis-based Compare-And-Swap (CAS) broker implementation for the matcher system. The Redis CAS broker provides an alternative event distribution mechanism that uses Redis SET operations with polling instead of Redis Streams, offering simpler conflict resolution and reduced dependency complexity.

Key changes:

  • Implementation of Redis CAS broker with polling-based event consumption
  • Renaming of broker interfaces from EventBrokerInterface to Broker for consistency
  • Comprehensive test coverage for the new Redis CAS broker including integration tests

Reviewed Changes

Copilot reviewed 15 out of 18 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
types.go Renamed EventBrokerInterface to Broker
redis_cas_broker.go New Redis CAS broker implementation with timestamp-based event ordering
redis_cas_broker_test.go Unit tests for Redis CAS broker functionality
redis_cas_broker_integration_test.go Integration tests for multi-node scenarios
scripts/test_redis_setup.sh Test setup script for Redis environment
redis_broker.go Renamed RedisEventBroker to RedisBroker
kafka_broker.go Renamed KafkaEventBroker to KafkaBroker
matcher.go Updated to use renamed Broker interface
api.go Updated broker interface references
brokers_test.go Updated tests for renamed interface
example/ files Updated examples to use new broker interface
docs/BROKERS.md Updated documentation for interface rename
go.mod Added testify dependency

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread redis_cas_broker_test.go
Comment thread redis_cas_broker_integration_test.go
Comment thread redis_cas_broker_integration_test.go
Comment thread redis_cas_broker.go
Comment thread redis_cas_broker.go
Comment thread scripts/test_redis_setup.sh
Comment thread scripts/test_redis_setup.sh
Copilot AI and others added 2 commits August 27, 2025 15:37
Co-authored-by: cloorc <13597105+cloorc@users.noreply.github.com>
Signed-off-by: Cloorc <wittcnezh@foxmail.com>
@massiveio massiveio merged commit 2c298f1 into master Aug 27, 2025
2 checks passed
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.

4 participants