Skip to content

Make stream name configurable

Max Woolf requested to merge 46-make-stream-configurable into main

What does this MR do? 1

  • New Configuration Structure

    • Added a new common QueuingConfig struct in pkg/common/queue_config.go that includes fields for driver, URL, username, password, and a new required stream_name field
    • Moved the queueing configuration from individual packages to this common structure
  • NATS Queue Modifications

    • Updated NewNATSQueue function to accept the full queueing config instead of just the address
    • Modified stream naming to use the configured stream_name instead of hardcoded "REPL_EVENTS"
    • Changed subject pattern to use the configured stream name with wildcard suffix (stream_name.>)
  • Configuration Updates

    • Added stream_name field to all configuration YAML files (sample.config.yml, test_config.yml, demo_consumer.yml)
    • Updated configuration validation and tests to handle the new stream name requirement
    • Commented out the old TestQueueingConfig_Validation test, likely pending updates for the new structure
  • Code Refactoring

    • Removed duplicate QueuingConfig structs from individual packages in favor of the common definition
    • Updated all relevant imports to use the new common package
    • Modified test suites to pass the full queueing configuration where needed

How do I test it?

Closes #46 (closed)

  1. Duo generated

Edited by Max Woolf

Merge request reports

Loading