1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

updating go nats-pub example path

from nats-site PR #440
This commit is contained in:
Ginger Collison 2019-06-11 10:26:55 -05:00 committed by GitHub
parent b82f67d1f6
commit b28a39477d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ git clone https://github.com/nats-io/ruby-nats.git
```sh
cd $GOPATH/src/github.com/nats-io/nats.go/examples
go run nats-qsub.go foo my-queue
go run nats-qsub/main.go foo my-queue
```
### 4. Install and run the Node client subscriber with queue group name
@ -46,14 +46,14 @@ nats-queue foo my-queue &
```sh
cd $GOPATH/src/github.com/nats-io/nats.go/examples
go run nats-sub.go foo
go run nats-sub/main.go foo
```
### 7. Publish a NATS message using the Go client
```sh
cd $GOPATH/src/github.com/nats-io/nats.go/examples
go run nats-pub.go foo "Hello NATS!"
go run nats-pub/main.go foo "Hello NATS!"
```
### 8. Verify message publication and receipt
@ -65,7 +65,7 @@ You should see that only one of the my-queue group subscribers receives the mess
### 9. Publish another message
```sh
go run nats-pub.go foo "Hello NATS Again!"
go run nats-pub/main.go foo "Hello NATS Again!"
```
You should see that a different queue group subscriber receives the message this time, chosen at random among the 3 queue group members.