These examples show the basics of using the NATS client.
- NATS provides everything needed to publish and subcribe messages into the bus.
- Sync, Async and Channels are supports.
- You can create request/response constructs as well.
Synchronous Messaging (Go Playground)
Asynchronous Messaging (Go Playground)
Channel Messaging (Go Playground)
Requests (Go Playground)
Queuing (Go Playground)
Write a program that has two goroutines playing a game of tennis. Pass the ball between the two goroutines using the NATS service. Pick a random number to determine if a goroutine missed the ball. Shut the program down cleanly once a goroutine loses.
All material is licensed under the Apache License Version 2.0, January 2004.