basic/

directory
v0.0.0-...-e636a3f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2017 License: Apache-2.0

README

NATS : Basic Examples

These examples show the basics of using the NATS client.

Notes

  • 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.

Code Review

Synchronous Messaging (Go Playground)
Asynchronous Messaging (Go Playground)
Channel Messaging (Go Playground)
Requests (Go Playground)
Queuing (Go Playground)

Exercises

Exercise 1

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.

Directories

Path Synopsis
Sample program to show to connect and publish/subscribe for messages.
Sample program to show to connect and publish/subscribe for messages.
Sample program to show to connect and publish/subscribe for messages.
Sample program to show to connect and publish/subscribe for messages.
Sample program to show to using the queuing functionality to allow a round robin of services to handle messages.
Sample program to show to using the queuing functionality to allow a round robin of services to handle messages.
Sample program to show to connect and publish/subscribe requests.
Sample program to show to connect and publish/subscribe requests.
Sample program to show to connect and publish/subscribe for messages.
Sample program to show to connect and publish/subscribe for messages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL