publish subscriber using nats and postgresql
Libraries:
- github.com/jinzhu/gorm
- github.com/nats-io/nats.go
- github.com/nats-io/stan.go
- go.uber.org/zap
- github.com/spf13/viper
How to run:
- import db_queue.sql into your database
- download libraries go
- edit properties in properties directory
- edit configPath in executor directory
- running executor(example: ". start-produce-service.sh")
How to test:
- running go script in test directory
Example:
- running consume:
- go run consume.go
- response (status:success, error:), consume still waiting message by name queue
- running produce:
- go run produce.go
- response (status:success, error:), message will send to consume