Replicated setTimeout()
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
.gitignore
.travis.yml
LICENSE
Makefile
README.md
amqp.go
client.go
client_message.go
config.go
delayd.toml
entry.go
entry_test.go
log.go
main.go
main_test.go
raft.go
raft_test.go
sender.go
server.go
storage.go
storage_test.go
timer.go
timer_test.go
util.go

README.md

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