Make stream name configurable
1
What does this MR do?-
New Configuration Structure
- Added a new common
QueuingConfig
struct inpkg/common/queue_config.go
that includes fields for driver, URL, username, password, and a new requiredstream_name
field - Moved the queueing configuration from individual packages to this common structure
- Added a new common
-
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.>
)
- Updated
-
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
- Added
-
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
- Removed duplicate
How do I test it?
Closes #46 (closed)
-
Duo generated ↩
Edited by Max Woolf