lightweight in-memory message queue
424
qlite is a light weight in memory message queue that is intended to hold long-running http requests for asynchronous processing. Due to its lightweight nature it is intended to be tightly coupled to the ingesting application. DO NOT USE qlite for large scale message handling.
docker pull sgovindan/qlite:latest
docker run -d -p 8080:8080 qlite:latest
Requirements:
git clone https://github.com/govindansriram/qlite.git
cd qlite
go build .
## start the server
./qlite start path/to/the/config.yaml
Settings must be specified in a config.yaml file.
credentials & settings needed to establish a connection
users:
- name: pub
password: publisher
publisher: true
subscriber: false
the port the tcp server will be exposed
port: 5000
the address that can be used for communication
address: 0.0.0.0
The amount of subscribers that can be connected to the server
maxSubscriberConnections: 10
The amount of publishers that can be connected to the server
maxPublisherConnections: 10
The max size of a message in the queue
maxMessageSize: 1000
The max amount of time waiting for a read or write on a connection to succeed
maxIoTimeSeconds: 1000
The max amount of time to wait for LPOP to receive a response from the queue
maxIoTimeSeconds: 1000
The max amount of time a message can be hidden from subscribers for
maxIoTimeSeconds: 1000
display server logs
maxIoTimeSeconds: true
users:
- name: pub
password: publisher
publisher: true
- name: sub
password: subscriber
subscriber: true
port: 8080
maxSubscriberConnections: 5
maxPublisherConnections: 10
maxMessageSize: 10000
maxIoTimeSeconds: 5
maxPollingTimeSeconds: 10
address: 0.0.0.0
maxHiddenTimeSeconds: 30
verbose: true
Communication takes place over a tcp/ip connection, and must begin with authentication
One common rule is the first 4 bytes of any client or server side message will represent the size of the message being sent. The size should be an uint32 number in little endian format
The first 4 bytes of every message are an uint32 segment detailing the size of the message
After that the ascii name for one of 4 different functions should be present followed by a semicolon these are:
after the semicolon add the message you wish to store on the queue. No binary format is required, it is on the consumer to decipher it.
after the semicolon, the hidden time in seconds must be added as an Uint32 in little endian binary format. The hidden time must be less than the maxHiddenTimeSeconds
after the semicolon, the hidden time in seconds must be added as an Uint32 in little endian binary format. The hidden time must be less than the maxHiddenTimeSeconds
after the semicolon, the next 2 bits should contain the uuid of the hidden message
No data is required after the semicolon
The first 4 bytes of every message are an uint32 segment detailing the size of the message Following the message length, will be the ascii encoded string PASS or FAIL delimited by a semicolon
Content type
Image
Digest
sha256:a8d921a7a…
Size
7.9 MB
Last updated
almost 2 years ago
docker pull sgovindan/qlite