🔧 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:
@@ -72,14 +72,7 @@ func ProvideNATSConn(cfg *config.Config, logger *zap.Logger) (*nats.Conn, error)
|
||||
}
|
||||
|
||||
// ProvideJetStream creates a JetStream context from a NATS connection.
|
||||
// Returns nil when mode is "core" to indicate JetStream should not be used.
|
||||
func ProvideJetStream(nc *nats.Conn, cfg *config.Config, logger *zap.Logger) (nats.JetStreamContext, error) {
|
||||
// In core mode, return nil so that publishers/consumers use core NATS
|
||||
if cfg.NATS.Mode == "core" {
|
||||
logger.Debug("Skipping JetStream initialization (core mode)")
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
js, err := nc.JetStream()
|
||||
if err != nil {
|
||||
logger.Error("failed to create JetStream context", zap.Error(err))
|
||||
|
||||
Reference in New Issue
Block a user