🔧 Update Go module dependencies and modify NATS configuration to exclusively support JetStream mode. Upgrade go.uber.org/zap to version 1.27.1 and golang.org/x/crypto to version 0.45.0. Revise Makefile and documentation to reflect changes in NATS mode, ensuring consistent messaging behavior across development and production environments. Enhance README and configuration files to clarify JetStream usage and remove references to Core NATS mode.

This commit is contained in:
windyboy
2025-11-21 09:59:47 +08:00
parent ee7cac95f0
commit 6eff35b56f
16 changed files with 91 additions and 382 deletions
+4 -4
View File
@@ -330,10 +330,10 @@ func (c *Config) Validate() error {
if c.NATS.URL == "" {
return fmt.Errorf("nats.url is required")
}
switch strings.ToLower(c.NATS.Mode) {
case "", "jetstream", "core":
default:
return fmt.Errorf("nats.mode must be 'jetstream' or 'core'")
// Validate NATS mode - only JetStream is supported
mode := strings.ToLower(c.NATS.Mode)
if mode != "" && mode != "jetstream" {
return fmt.Errorf("nats.mode must be 'jetstream' or empty (defaults to 'jetstream'), got: %s", c.NATS.Mode)
}
if c.NATS.Stream == "" {
return fmt.Errorf("nats.stream is required")