Module: SimpleQueues

Defined in:
lib/simple_queues.rb,
lib/simple_queues/redis.rb,
lib/simple_queues/version.rb,
lib/simple_queues/encoders/json.rb,
lib/simple_queues/encoders/identity.rb,
lib/simple_queues/encoders/message_pack.rb

Overview

A simple API for queueing and dequeueing messages.

In the Gang of Four book, the phrase “Program to an interface, not an implementation” made me think I shouldn’t bind my software directly to Redis, but to an API from which I could change the implementation at any time. If I ever need to replace Redis with RabbitMQ, it will be possible to do so, given my software is coded to this interface.

All SimpleQueues implementations support three methods:

  • enqueue

  • dequeue_with_timeout

  • dequeue_blocking

Defined Under Namespace

Classes: IdentityEncoder, JsonEncoder, MessagePackEncoder, Redis

Constant Summary collapse

VERSION =
"1.3.0"