Skip to content

hfeeki/delayd

 
 

Repository files navigation

Delayd

Build Status BSD License

Delayd is an available setTimeout() service for scheduling message sends.

Delayd can send and receive messages over AMQP, with more transports planned.

Running

./delayd server -c delayd.toml

To ensure availability, Delayd is clustered via raft. You should run at least 3 Delayd servers. This permits the cluster to keep running if one server fails.

Guarantees

Delayd ensures that after a message has been received, it will be delivered at least once. A message that has reached its delay time may be delivered more than once if the cluster leader fails after emitting the message, but before this state has replicated to the other cluster members.

AMQP Message Format

Message bodies are forwarded unchanged from received messages after their delay lapses. All Delayd directives are taken from AMQP headers.

Required Headers

  • delayd-delay (number) Delay time in ms before emitting this message.
  • delayd-target (string) Target exchange for this message.

Optional Headers

  • delayd-key (string) If a message with the same key exists in Delayd, this message will replace it.

Developing

delayd is built/developed with go1.2. I recommend using the excellent gvm to install it.

To get started:

make deps  # install required modules
make check # run fmt, vet, lint
make test  # run unit tests
make       # build the executable

License

© 2014 salesforce.com. Licensed under the BSD 3-clause license.

GoInstant

About

Replicated setTimeout()

Resources

License

Stars

Watchers

Forks

Packages

No packages published