Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 932 Bytes

File metadata and controls

35 lines (25 loc) · 932 Bytes

RabbitMQ QR Worker

Consumes messages from a RabbitMQ queue and renders each message as an ASCII QR code in the terminal.

Execution

# Default configuration
./bin/qr-worker

# Custom connection and queue
./bin/qr-worker -url amqp://user:pass@rabbitmq:5672/ -queue myqueue

Flags

Flag Description Default
-url AMQP connection URL amqp://guest:guest@localhost:5672/
-queue Queue name to consume from default

Example

./bin/qr-worker -url amqp://guest:guest@localhost:5672/ -queue orders

Behavior

  • Establishes AMQP connection
  • Subscribes to the specified queue
  • For each message:
    • Generates and prints an ASCII QR code
    • Prints the raw message payload
  • Runs until terminated (Ctrl+C)