GoQueue

A high-performance distributed message queue built in Go.
Combines the best of Kafka, SQS, and RabbitMQ.


What is GoQueue?

GoQueue is a distributed message queue that combines the best features from multiple messaging systems:

Built from the ground up in Go for performance, simplicity, and cloud-native deployments.


Key Features

๐Ÿ“ฆ

Topics & Partitions

Kafka-style log-based storage with configurable partitions for parallelism and ordering guarantees.

๐Ÿ‘ฅ

Consumer Groups

Automatic partition assignment, rebalancing, and cooperative rebalancing (KIP-429 style).

โœ…

Message Reliability

ACK/NACK, visibility timeouts, automatic retries, and dead letter queues.

โšก

Priority Queues

5 priority levels with weighted fair queuing to prevent starvation.

โฐ

Delayed Messages

Schedule messages for future delivery with second-precision timing.

๐Ÿ“‹

Schema Registry

JSON Schema validation with compatibility checking (Confluent API compatible).

๐Ÿ”„

Transactions

Exactly-once semantics with idempotent producers and atomic commits.

๐Ÿ“Š

Observability

Prometheus metrics, distributed tracing, and comprehensive health checks.


Quick Example

Publish a Message

curl -X POST http://localhost:8080/topics/orders/messages \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{
      "key": "user-123",
      "value": "{\"orderId\": \"12345\", \"amount\": 99.99}",
      "priority": "high"
    }]
  }'

Consume via Consumer Group

# Join group
curl -X POST http://localhost:8080/groups/order-processors/join \
  -H "Content-Type: application/json" \
  -d '{"client_id": "consumer-1", "topics": ["orders"]}'

# Poll for messages
curl "http://localhost:8080/groups/order-processors/poll?member_id=<member_id>&timeout=30s"

Using the Go Client

package main

import (
    "context"
    "log"
    
    "goqueue/pkg/client"
)

func main() {
    // Create client
    c, err := client.New(client.DefaultConfig("localhost:9000"))
    if err != nil {
        log.Fatal(err)
    }
    defer c.Close()

    // Publish
    resp, err := c.Publish(context.Background(), "orders", 
        []byte(`{"orderId": "12345"}`))
    if err != nil {
        log.Fatal(err)
    }
    log.Printf("Published to partition %d, offset %d", 
        resp.Partition, resp.Offset)
}

Why GoQueue?

Feature Kafka RabbitMQ SQS GoQueue
Deployment Complex (JVM + ZK) Medium Managed Simple (single binary)
Priority Queues โŒ โœ… โŒ โœ…
Delayed Messages โŒ โœ… Plugin โœ… โœ…
Visibility Timeout โŒ โŒ โœ… โœ…
Partitioning โœ… โŒ FIFO only โœ…
Consumer Groups โœ… โŒ โŒ โœ…
Transactions โœ… โœ… โŒ โœ…
Schema Registry Separate โŒ โŒ Built-in

See full comparison โ†’


Getting Started

Ready to try GoQueue? Follow our quickstart guide:

  1. Install GoQueue
  2. Create your first topic
  3. Set up consumer groups
  4. Explore the API