Quick start
This example uses authentication disabled only to keep the first local session short. Production deployments should enable authentication and TLS.
1. Local configuration
Section titled “1. Local configuration”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"}2. Start Amaquet
Section titled “2. Start Amaquet”Start the server with the local configuration created in the previous step. The process remains in the foreground and owns both configured listeners.
./bin/amaquet -config ./amaquet.json3. Ping
Section titled “3. Ping”From another terminal, use the CLI to verify that the native protocol listener accepts commands.
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 PING '{}'4. Store a typed scalar
Section titled “4. Store a typed scalar”Store a directly encoded value with SET, then retrieve it with GET to confirm its type and payload.
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 SET \ '{"key":"user:1:name","type":"utf8_string","value":"Nathanne"}'Read it:
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 GET \ '{"key":"user:1:name"}'5. Create a collection
Section titled “5. Create a collection”Composite values are initialized with CREATE; use OP to apply a type-specific mutation afterward.
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 CREATE \ '{"key":"queue:jobs","type":"fifo_queue","options":{}}'Add a typed value:
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 OP \ '{"key":"queue:jobs","operation":"ENQUEUE","args":{"value":{"type":"utf8_string","value":"build"}}}'6. Add TTL
Section titled “6. Add TTL”Expiration is expressed in positive milliseconds. This command gives the scalar key a 60-second lifetime without changing its value.
./bin/amaquet-cli -uri amaquet://127.0.0.1:13378 EXPIRE \ '{"key":"user:1:name","ttl_ms":60000}'7. Inspect server metadata
Section titled “7. Inspect server metadata”Use these read-only commands to inspect runtime information and the registered type catalog.
./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.