Skip to content

AliNazariii/message-broker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Message Broker

This project is a Go-based message broker designed to efficiently handle message passing, processing, and communication across distributed systems. It provides a robust and scalable infrastructure to enable seamless data flow and integration.


Project Summary

The Message Broker project is structured to achieve high performance and modularity. Below is a quick overview of its components:

Project Structure

  • load_test/: Contains scripts and configurations for performance and load testing to ensure the broker handles high traffic scenarios.
  • deploy/: Includes deployment configurations, such as containerization or orchestration files.
  • internal/: Holds internal components that are crucial to the broker's operations but are not exposed as public APIs.
  • scripts/: Utility scripts to automate tasks like building, testing, or running the project.
  • api/: Contains API definitions and implementations to interact with the broker, likely including REST or gRPC.
  • pkg/: Reusable packages that provide helper functions, shared utilities, or core logic for the application.
  • main.go: The entry point of the application, responsible for initializing the broker and its components.

Functionality Details

Core Features

  1. Message Publishing: Enables clients to publish messages to specific topics or channels.
  2. Message Consumption: Supports subscription to topics, allowing clients to consume messages in real-time or via polling.
  3. Load Balancing: Distributes messages among consumers to maintain efficiency and prevent overload.
  4. Fault Tolerance: Ensures messages are not lost during failures by incorporating reliable delivery mechanisms.
  5. Scalability: Designed to handle increasing workloads through distributed processing and efficient resource utilization.

Workflow

  1. Initialization: The application starts from main.go, where the core broker services are initialized.
  2. Client Interaction: APIs defined in the api/ folder allow clients to interact with the broker for publishing and consuming messages.
  3. Message Handling: The core logic in internal/ processes messages, ensuring they are routed and delivered correctly.
  4. Deployment: The deploy/ folder includes tools for containerizing the broker or deploying it to environments like Kubernetes.

Getting Started

Prerequisites

  • Go: Ensure Go is installed on your system.
  • Docker (optional): For containerized deployment.

Running the Application

  1. Clone the repository:
    git clone [email protected]:AliNazariii/message-broker.git
  2. Navigate to the project directory:
    cd message-broker
  3. Build and run the application:
    go run main.go

About

A Message Broker Implementation in Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published