Skip to content

Commit

Permalink
add nats.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslopezf committed Feb 2, 2024
1 parent 61dfa42 commit 53ef505
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ version: '3.0'
services:
nats:
image: nats:latest
command: "-js -m 5530"
command: "-js -m 5530 --config /root/config.yaml"
ports:
- "4222:4222"
- "5530:5530"
volumes:
- ./nats_config.yaml:/root/config.yaml
- ./nats.conf:/root/config.yaml
4 changes: 4 additions & 0 deletions nats.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
jetstream {
max_mem: 1G,
max_file: 5G
}
3 changes: 0 additions & 3 deletions nats_config.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions znats/nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ func newJetStreamServer(server string, credential Credential) (error, nats.JetSt
// Connect to NATS
zap.S().Infof("Attempting to connect to nats server in %s ...", server)
nc, err = nats.Connect(server)
fmt.Println(fmt.Sprintf("Attempting to connect to nats server in %s ...", server))
fmt.Printf("Attempting to connect to nats server in %s ...", server)
if err != nil {
fmt.Println(fmt.Sprintf("Error %v", err.Error()))
fmt.Printf("Error %v", err.Error())
return err, nil, nil
}
}
Expand Down

0 comments on commit 53ef505

Please sign in to comment.