mirror of
https://github.com/taigrr/nats.docs
synced 2025-01-18 04:03:23 -08:00
parent
b82f67d1f6
commit
b28a39477d
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user