harryleonardo / go-nats

Implementation of Asynchronous and Queue Subscriptions on NATS using Golang with Uncle Bob Clean Arch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Nats

Overview

NATS is an open source, lightweight, high-performance cloud native infrastructure messaging system. It implements a highly scalable and elegant publish-subscribe (pub/sub) distribution model. The performant nature of NATS make it an ideal base for building modern, reliable, scalable cloud native distributed systems.

Implemented with clean architecture by Uncle Bob in folder structure. Hopefully make you easier to implement this message broker.

Stack

So basically, this app was build using:

  • Golang
  • Nats

Prerequisite

  • Install go v1.11 or above to use go modules
  • Make vendored copy of depedencies
        go mod vendor
  • Copy app.config.sample yml into decided environment. For example:
        cp app.config.sample.yml app.config.dev.yml
  • Fill the yml values
  • Make sure your nats is ready (docker will help your life)
  • You can use go-nats.postman_collection.json to test this repository

Usage

  1. Manual run
        make start
  2. Bash script
         bash run.sh

Images

In this repo, there are two feature that implemented so far:

  • Asynchronous Subscriptions

    Image of Chart Here is response : Image of Chart

  • Queue Subscriptions

    Image of Chart Here is response : Image of Chart

Reference

About

Implementation of Asynchronous and Queue Subscriptions on NATS using Golang with Uncle Bob Clean Arch

License:Apache License 2.0


Languages

Language:Go 99.5%Language:Makefile 0.5%