go get github.com/catmullet/Raithe
Your env file simply contains the port you want to run from and the redis configuration.
# Essential Configurations
PORT=8021
# Redis
REDIS_URL=127.0.0.1:6379
REDIS_PASSWORD=""
REDIS_DB=0
go run raithe.go
Your agents list will contain all agents that can register as a "producer" or "consumer", both are the same to Raithe. Contained within your agents_list.json of the root folder you will see something like this. Just list the names of the agents and each agent will need to call the register path (/auth/register) to stake thier claim on that agent name.
{
"agents": [
"test"
]
}
A Client is any service attempting to push or pop from the message queue.
Contained within the root directory is a file agents_list.json. This file contains all the agents that can register and is read in realtime. So Adding an agent is easy.
{
"agent_name":"{{agent name}}"
}
{
"success": true,
"message": "",
"security_token": {
"agent_name": "{{agent name}}",
"token": "{{token}}"
}
}
Pusing a message can be done by any agent. Queues are the key and will be how agents identify which queue to pull from.
{
"queue":"test",
"message":"Hello World",
"security_token": {
"agent_name": "{{agent name}}",
"token": "{{token}}"
}
}
{
"success": true
}
Popping a message from the queue will grab the oldest message first. Simple as that.
{
"queue":"test",
"security_token": {
"agent_name": "{{agent name}}",
"token": "{{token}}"
}
}
{
"queue": "test",
"message": "Hello World"
}