Skip to content

shabihish/routing-broker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Certainly! Here's a more comprehensive README for the Routing-Broker repository:


Routing-Broker

Go

A broker for fast multi-threaded message passing to a server.

Table of Contents

Introduction

Routing-Broker is a high-performance message broker written in Go, designed to facilitate fast and efficient multi-threaded message passing to a server. It is ideal for applications requiring rapid message processing and reliable communication channels.

Features

  • High Performance: Optimized for speed and efficiency.
  • Multi-threaded: Supports concurrent message processing.
  • Scalable: Easily scalable to handle increasing loads.
  • Simple Configuration: Easy to set up and configure.
  • Reliable: Ensures reliable message delivery.

Installation

To install Routing-Broker, make sure you have Go installed, and then run the following command:

go get github.com/shabihish/Routing-Broker

Usage

Here is a basic example of how to use Routing-Broker:

package main

import (
    "fmt"
    "github.com/shabihish/Routing-Broker/broker"
)

func main() {
    // Create a new broker instance
    b := broker.NewBroker()

    // Define a message handler
    handler := func(msg broker.Message) {
        fmt.Println("Received message:", msg)
    }

    // Subscribe to a topic
    b.Subscribe("exampleTopic", handler)

    // Publish a message
    b.Publish("exampleTopic", "Hello, World!")

    // Start the broker
    b.Start()
}

Configuration

Routing-Broker can be configured via a configuration file or environment variables. Below is an example of a configuration file:

broker:
  host: "localhost"
  port: 8080
  maxThreads: 10
  logLevel: "info"

To use the configuration file, pass its path as an argument when starting the broker:

go run main.go --config=config.yaml

Contributing

We welcome contributions to Routing-Broker! If you have any improvements or fixes, please open an issue or submit a pull request.

License

Routing-Broker is licensed under the MIT License. See the LICENSE file for more details.


Feel free to modify this README further to suit your specific requirements and provide more detailed usage examples or configuration options as needed.

About

A broker for fast multi-threaded message passing to a server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages