# README
go-rsmq
A Go implementation of the Node.js rsmq package.
Example
// Create a redis client
client := redis.NewClient(&redis.Options{
Addr: "localhost:6379",
})
mq := rsmq.NewRedisSMQ(client, "")
err = mq.CreateQueue("myqueue")
if err != nil {
return err
}
messageID, err := mq.SendMessage("myqueue", "hello")
if err != nil {
return err
}
message, err := mq.ReceiveMessage("myqueue")
if err != nil {
return err
}
if message != nil {
mq.DeleteMessage("myqueue", message.ID)
if err != nil {
return err
}
}
TODO
- Finish tests. The message send side is covered ok, but not the receive side.
# Functions
NewRedisSMQ creates a new RedisSMQ object.
# Variables
Errors that can be returned from RedisSMQ operations.
Errors that can be returned from RedisSMQ operations.
Errors that can be returned from RedisSMQ operations.
Errors that can be returned from RedisSMQ operations.
Errors that can be returned from RedisSMQ operations.
Errors that can be returned from RedisSMQ operations.
Errors that can be returned from RedisSMQ operations.
Errors that can be returned from RedisSMQ operations.
Errors that can be returned from RedisSMQ operations.
# Structs
QueueAttributes contains settings and stats for a queue.
QueueMessage contains information for a message stored in a queue.
RedisSMQ is used to manage queues and messages.