enterprise-mq

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

README

Enterprise Message Queue (Kafka) Example

In large-scale architectures, event data is often streamed into message brokers like Kafka or RabbitMQ for downstream consumption by microservices, analytics engines, or data warehouses.

Features Shown

  • Kafka Integration: Using the sink.KafkaOutput to produce messages.
  • Failover Logic: Demonstration of how to handle MQ connectivity issues in the application layer.
  • Real-world Filter: Monitoring Uniswap V2 Pair Creation events.

Prerequisites

  • A running Kafka cluster.
  • (Optional) Set KAFKA_BROKER environment variable.

How to Run

  1. Start Kafka (using Docker):

    # Simple single-node Kafka setup
    docker run -p 9092:9092 apache/kafka:latest
    
  2. Run the example:

    go run main.go
    

Message Format

Events are sent as JSON-encoded messages to the specified Kafka topic. Each message includes the raw log data and any available metadata, keyed by the transaction hash for partition stability.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL