Skip to content

Tervicke/Tolstoy

Repository files navigation

A lightweight pub sub system written in golang

read the specs to get a understanding of how the pub sub protocol.

we are now using protocol buffers , see the protofile

Tests Version

Running the example

TO run the example follow these steps

  1. Start the main broker
make runbroker
  1. Run the publisher , in a different terminal instance
make publisher
  1. Run subscriber
make subscriber

example screenshot

Running the broker

./broker --config path_to_config.yaml

Sample config

# The port number on which the broker server will listen for incoming connections
Port: 8080

# The host address the server will bind to (usually "localhost" for local development)
Host: "localhost"

# A list of initial topics that the broker will recognize; clients can publish/subscribe to these
Topics:
  - "mytopic"
  - "anothertopic"

# Configuration related to message persistence
Persistence:
  # Whether to enable saving messages to disk (false means messages are kept in memory only)
  Enabled: false
  
  # Directory path where topic data will be stored if persistence is enabled
  Directory: "broker/data/topics/"
Tls: #tls settings
  Enabled: false #enable or disable tls
  CertFile: "broker/data/tls/server.crt"
  KeyFile: "broker/data/tls/server.key"

ToDo

  • Make a simple demo publisher in Go
  • Make a simple demo subscriber in go
  • Add baisc authentication in the topic access (TLS)
  • Persistent storage of messages
  • Write a small benchmark tool
  • Add logging
  • better readme and build & run instructions
  • Add offsets and to persisteted message
  • Add feature to pause the upcoming messages
  • Add feature to resume from lateset/lastoffset messages

About

pub sub system written in go

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors