Skip to content

Quick start

This example uses authentication disabled only to keep the first local session short. Production deployments should enable authentication and TLS.

Create amaquet.json:

{
"protocol": {
"host": "127.0.0.1",
"port": 13378,
"tls": false,
"require_auth": false
},
"admin": {
"host": "127.0.0.1",
"port": 13379
},
"security": {
"bootstrap_token": "replace-this"
},
"persistence": {
"aof_enabled": false,
"aof_path": "./data/amaquet.aof",
"fsync": "everysec"
},
"limits": {
"max_connections": 10000,
"max_payload_bytes": 67108864
},
"data_dir": "./data"
}

Start the server with the local configuration created in the previous step. The process remains in the foreground and owns both configured listeners.

Terminal window
./bin/amaquet -config ./amaquet.json

From another terminal, use the CLI to verify that the native protocol listener accepts commands.

Terminal window
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 PING '{}'

Store a directly encoded value with SET, then retrieve it with GET to confirm its type and payload.

Terminal window
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 SET \
'{"key":"user:1:name","type":"utf8_string","value":"Nathanne"}'

Read it:

Terminal window
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 GET \
'{"key":"user:1:name"}'

Composite values are initialized with CREATE; use OP to apply a type-specific mutation afterward.

Terminal window
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 CREATE \
'{"key":"queue:jobs","type":"fifo_queue","options":{}}'

Add a typed value:

Terminal window
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 OP \
'{"key":"queue:jobs","operation":"ENQUEUE","args":{"value":{"type":"utf8_string","value":"build"}}}'

Expiration is expressed in positive milliseconds. This command gives the scalar key a 60-second lifetime without changing its value.

Terminal window
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 EXPIRE \
'{"key":"user:1:name","ttl_ms":60000}'

Use these read-only commands to inspect runtime information and the registered type catalog.

Terminal window
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 INFO '{}'
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 TYPES '{}'

Next, read Amaquet commands and data types.