Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: redis streams pubsub implementation #1611

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Ubisoft-potato
Copy link
Collaborator

@Ubisoft-potato Ubisoft-potato commented Mar 21, 2025

Key Changes

1. Global PubSub Configuration

  • Added centralized PubSub configuration in values.yaml and values.dev.yaml under global.pubsub
  • Standardized configuration includes:
    • PubSub type (google/redis-stream)
    • Redis connection settings (address, pool size, min idle)
    • Project ID
    • Emulator host settings

2. Deployment Template Updates

Updated deployment templates for all components (web, api, batch, subscriber) to use global PubSub values:

  • Removed component-specific PubSub configurations
  • Added environment variables for PubSub type and Redis settings
  • Standardized environment variable naming across components

3. Subscriber Configuration

  • Updated subscribers-configmap.yaml to dynamically merge global PubSub settings into subscriber configurations
  • Added support for both regular and on-demand subscribers
  • Maintained backward compatibility with existing subscriber configurations

4. Redis Stream Implementation

Added new Redis Stream-based PubSub implementation:

  • Created stream_client.go for Redis Stream client implementation
  • Implemented stream_publisher.go and stream_puller.go for Redis Stream operations
  • Added mock implementations for testing

5. Factory Pattern Implementation

  • Introduced factory.go for creating PubSub clients
  • Added support for multiple PubSub providers (Google Cloud and Redis Stream)
  • Implemented provider-specific configuration options

Migration Notes

  • Existing deployments will continue to work with default Google Cloud PubSub
  • Redis Stream support can be enabled by setting global.pubsub.type: redis-stream
  • No manual intervention required for existing configurations

Breaking Changes

None. This change is backward compatible and maintains existing functionality while adding new capabilities.

@Ubisoft-potato Ubisoft-potato force-pushed the feat-redis-pubsub branch 4 times, most recently from 1f6f83c to 9deb0cd Compare March 28, 2025 07:41
…fests with Redis support, centralizing settings under global.pubsub for improved maintainability
@Ubisoft-potato Ubisoft-potato changed the title feat: redis pubsub implementation feat: redis streams pubsub implementation Apr 1, 2025
@Ubisoft-potato Ubisoft-potato marked this pull request as ready for review April 1, 2025 08:28
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.

1 participant