Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. pubsub

pubsub

BSD-2-ClauseGo

A simple multi-topic publish-subscribe library for Go applications.

GitHubGitHub
453 stars63 forks0 contributors

What is pubsub?

Pubsub is a Go package that implements a simple multi-topic publish-subscribe messaging pattern. It allows different components of a Go application to communicate asynchronously by publishing messages to topics and subscribing to receive those messages, helping to decouple system architecture.

Target Audience

Go developers building event-driven applications, microservices, or systems that require loose coupling between components through messaging patterns.

Value Proposition

Developers choose Pubsub for its minimalistic design, concurrent safety, and ease of integration—providing essential pub-sub functionality without the overhead of larger message broker systems.

Overview

A simple pubsub package for go.

Use Cases

Best For

  • Implementing event-driven communication between Go microservices
  • Decoupling components in monolithic Go applications
  • Building real-time notification systems in Go
  • Creating plugin architectures where modules communicate via events
  • Developing background job processors with topic-based routing
  • Adding asynchronous messaging to CLI tools or daemons written in Go

Not Ideal For

  • Applications requiring guaranteed message delivery or persistence, such as financial transaction systems
  • Distributed systems needing cross-instance message passing or clustering support
  • Projects that require advanced message routing, filtering, or transformation capabilities beyond basic topics
  • Teams looking for integrated monitoring, logging, or management interfaces for messaging

Pros & Cons

Pros

Multi-topic Support

Enables organized message routing through named topics, allowing publishers and subscribers to interact efficiently based on event types, as highlighted in the key features.

Concurrent Safety

Designed to handle concurrent publishing and subscribing operations safely in multi-goroutine environments, ensuring reliability in Go applications with heavy concurrency.

Simple API

Offers a clean and minimal interface that integrates easily without complex configuration, making it straightforward to adopt, as emphasized in the README.

Lightweight Overhead

Has minimal dependencies and low resource usage, suitable for performance-sensitive applications, reducing integration friction and operational costs.

Cons

No Persistence Mechanism

Messages are stored only in memory and lost on application crash or restart, limiting use in scenarios requiring data durability or fault tolerance.

Limited Advanced Features

Lacks built-in support for common messaging patterns like message filtering, priority queues, or dead-letter channels, which may necessitate custom implementations.

Basic Error Handling

Provides minimal error reporting and recovery options, requiring developers to add custom code for robust error management in production environments.

Frequently Asked Questions

Quick Stats

Stars453
Forks63
Contributors0
Open Issues0
Last commit2 years ago
CreatedSince 2012

Tags

#event-driven#golang-library#messaging#message-broker#golang#pubsub#decoupling#concurrency#go

Built With

G
Go

Included in

Go169.1k
Auto-fetched 17 hours ago

Related Projects

AsynqAsynq

Simple, reliable, and efficient distributed task queue in Go

Stars13,546
Forks972
Last commit1 month ago
saramasarama

Sarama is a Go library for Apache Kafka.

Stars12,501
Forks1,851
Last commit21 hours ago
CentrifugoCentrifugo

Scalable real-time messaging server in a language-agnostic way. Self-hosted alternative to Pubnub, Pusher, Ably, socket.io, Phoenix.PubSub, SignalR. Set up once and forever.

Stars10,544
Forks723
Last commit1 day ago
WatermillWatermill

Building event-driven applications the easy way in Go.

Stars9,810
Forks500
Last commit2 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub