nsqdelay can be used for sending delayed messages on top of NSQ, it listens on the delayed topic by default (configurable) and receives JSON encoded messages with the following structure:
{
"topic": "my_topic",
"body": "message_body",
"send_at": <unix timestamp>
}
It persists the messages to an sqlite file database and publish them when the time comes.
For all command line arguments use docker run --rm gbenhaim/nsqdelay -h
Otherwise run it with docker run -d --name nsqdelay gbenhaim/nsqdelay ....
- it is advisable to mount the path of the sqlite db file as a volume, so delayed messages will be persisted.