An example Event-Driven application in Go built with Watermill library.

Event-Driven application example

This is an example Event-Driven application written in Go, using Watermill.

The projects aims to integrate incoming GitHub webhooks with Grafana and Slack, essentially adding annotations and sending messages when a new commit is pushed. There are also simulated deployment messages sent over RabbitMQ to demonstrate working with multiple event streams.

An example result can look like this:

Running

If you'd like to integrate the example with your Slack workspace, copy .env-example to .env and fill in the webhook URL in SLACK_WEBHOOK_URL variable.

In addition to the application, the docker-compose environment consists of:

  • Kafka and ZooKeeper
  • RabbitMQ
  • Grafana
  • Prometheus

The whole environment can be run with:

docker-compose up

You can now configure your GitHub repository to send webhooks to the application (you need to expose port 8080 to the external network first).

Alternatively, you can run ./scripts/send-stub-webhook.sh to send some stub webhooks.

Visit localhost:3000/d/webhooks to see annotations added in Grafana. Use admin:secret as credentials.

Metrics

You can access the Watermill dashboard at localhost:3000/d/watermill. See what changes when you send more webhooks over time.

What's next?

See Watermill's documentation to learn more.

Owner
Three Dots Labs
Golang, Domain-Driven Design and Continuous Delivery.
Three Dots Labs
Similar Resources

Simple synchronous event pub-sub package for Golang

event-go Simple synchronous event pub-sub package for Golang This is a Go language package for publishing/subscribing domain events. This is useful to

Jun 16, 2022

A basic event queue (and publisher/subscriber) in go

queue A basic event queue (and publisher/subscriber) in go. Installation go get github.com/jimjibone/queue Queue Usage Queue is a channel-based FIFO q

Dec 17, 2021

Basic Event Streaming - Fundamentals of Kafka Studies (BESt-FunKS)

Apache Kafka My study repo for Apache Kafka. Based on this tutorial. Contents Overview Key Terms Event Topic Producer Consumer Partition Getting Start

Mar 2, 2022

CQRS & Event-Sourcing Framework for Go.

goes - Event-Sourcing Framework goes is a collection of interfaces, tools, and backend implementations that allow you to write event-sourced applicati

Dec 27, 2022

A lightweight event collection system.

A lightweight event collection system.

Honeypot A self-contained, multi-protocol streaming event collection system with ambitions to be as boring as benthos. Honeypot is primarily built for

Dec 6, 2022

Producer x Consumer example using Kafka library and Go.

Go - Kafka - Example Apache Kafka Commands First of all, run the docker-compose docker-compose up, than run docker exec -it kafka_kafka_1 bash Topics

Dec 8, 2021

socket.io library for golang, a realtime application framework.

go-socket.io go-socket.io is library an implementation of Socket.IO in Golang, which is a realtime application framework. Current this library support

Jan 8, 2023

NATS example to store and retrieve large file assets from JetStream.

njs-xfer njs-xfer is a sample application that demonstrates the ability to use NATS and JetStream to store and retrieve large file assets. This sample

Dec 26, 2022

GoLang + Kafka example project

Golang Kafka Example Sample Golang Kafka Consumer and Producer Setup Apache Kafka Quickstart Producer go run cmd/producer/main.go Consumer flags: brok

Nov 9, 2021
Go library to build event driven applications easily using AMQP as a backend.

event Go library to build event driven applications easily using AMQP as a backend. Publisher package main import ( "github.com/creekorful/event" "

Dec 5, 2021
pubsub controller using kafka and base on sarama. Easy controll flow for actions streamming, event driven.

Psub helper for create system using kafka to streaming and events driven base. Install go get github.com/teng231/psub have 3 env variables for config

Sep 26, 2022
POC of an event-driven Go implementation

Event Driven example in Golang This POC shows an example of event-driven architecture with a working domain event broker, an event producer and a cons

Nov 2, 2021
Govent is an event bus framework for DDD event source implement

Govent is an event bus framework for DDD event source implement. Govent can also solve the package circular dependency problem.

Jan 28, 2022
Event-planning-go - GRAPHQL Project for Event Planning

About The Project GRAPHQL Project for Event Planning Building the project with l

Mar 13, 2022
A quick introduction to how Apache Kafka works and differs from other messaging systems using an example application.
A quick introduction to how Apache Kafka works and differs from other messaging systems using an example application.

Apache Kafka in 6 minutes A quick introduction to how Apache Kafka works and differs from other messaging systems using an example application. In thi

Oct 27, 2021
:incoming_envelope: A fast Message/Event Hub using publish/subscribe pattern with support for topics like* rabbitMQ exchanges for Go applications

Hub ?? A fast enough Event Hub for go applications using publish/subscribe with support patterns on topics like rabbitMQ exchanges. Table of Contents

Dec 17, 2022
Easy to use distributed event bus similar to Kafka
Easy to use distributed event bus similar to Kafka

chukcha Easy to use distributed event bus similar to Kafka. The event bus is designed to be used as a persistent intermediate storage buffer for any k

Dec 30, 2022
Simple, high-performance event streaming broker

Styx Styx is a simple and high-performance event streaming broker. It aims to provide teams of all sizes with a simple to operate, disk-persisted publ

Nov 24, 2022
Discrete-event simulation in Go using goroutines

SimGo SimGo is a discrete event simulation framework for Go. It is similar to SimPy and aims to be easy to set up and use. Processes are defined as si

Sep 6, 2022