SMQD :: Scala MQtt Daemon
smqd is developed and tested in Java 8 environment
-
Download the latest version from here
-
Unarchive
smqd-x.y.z.zipfile where you want to install -
Set environment variable
SMQD_HOME_DIRwhere smqd installed directory path
$ export SMQD_HOME_DIR=/usr/local/smqd-x.y.z- start smqd
cd $SMQD_HOME_DIR
./bin/start-smqd.sh
If you want to run smqd as foreground process for debugging purpose, execute
./bin/smqdinstead of./bin/start-smqd.sh, and^Cto stop
- stop smqd
./bin/stop-smqd.sh
To change the JVM settings of smqd, edit $SMQD_HOME_DIR/conf/smqd-jvm.ini
In this file you can change JVM options with -J prefix.
You don't need '-J' prefix for the other values that is not a Java VM options.
-J-Xms256m -J-Xmx256m
When you run start-smqd.sh to start smqd, it will find the smqd config file from
-Dconfig.file=<Path SMQD_HOME_DIR>/conf/smqd.conf.
Caution: You can not use environment variable
$SMQD_HOME_DIRinsmqd-jvm.ini. Make sure to use a absolute path only in the file
To change the default settings of smqd, edit configuration file $SMQD_HOME_DIR/conf/smqd-conf.
The name of smqd instance. Node name should be unique in the cluster.
The default settings are like below.
node_name = "node-01"
node_name = ${?NODE_NAME}
It means node_name has "node-01" by default and
if environment variable $NODE_NAME is defined, it will overwrite the default value.
If $NODE_NAME does not exists, node_name will keep "node-01" as value.
This feature is great when you run a smqd in container environment (e.g Docker).
smqd is based on akka. And this setting is used for akka system's name.
If you are planning to run multiple smqd processes for a cluster, you must apply same actor_system_name for all nodes in a cluster.
We recommend to change this with unique name enven you don't have a plan ot use cluster for now.
actor_system_name = "default"
actor_system_name = ${?ACTOR_SYSTEM_NAME}
You can find the full reference configuration here.
smqd is using logback and configuration file is at $SMQD_HOME_DIR/conf/logback.xml.
If you want to place the logback config in a different directory,
change the value of -Dlogback.configurationFile in smqd-jvm.ini file.
For customization of logback.xml, please refer to the official web site of logback.