All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mqd-core_2.12.0.4.1.source-code.smqd-ref.conf Maven / Gradle / Ivy

There is a newer version: 0.5.0
Show newest version
# Copyright 2018 UANGEL
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

smqd {
  include "smqd-core-version.conf"

  # the name of this node, should be unique
  node_name = "smqd-01"

  # ActorSystem name
  actor_system_name = smqd

  # this section is used only when akka.actor.provider=cluster
  cluster {
    # the method to look for seed nodes
    discovery = static # static | etcd
    discovery_timeout = 5s

    static {
      seeds = ["127.0.0.1:2551"]
    }

    etcd {
      server = "http://127.0.0.1:2379"
      prefix = /smqd/cluster/seeds
      node_ttl = 1m
    }
  }

  tls {
    storetype = jks
    keystore = smqd-server.jks
    storepass = smqd.demo.key
    keypass = smqd.demo.key
  }

  # delegates that can change how sqmd works
  delegates {
//    user = com.example.CustomUserDelegate
//    client = com.example.CustomClientDelegate
//    sessionstore = com.example.CustomSessionStoreDelegate
//    registry = com.example.CustomRegistryDelegate
  }

  registry {
    #
    # do not turn this on, it is only for development and debug purpose
    verbose = false

    # regular expression for mqtt client id to validate format
    # this client id should be compatible with akka actor naming rule which is
    # Actor paths MUST: not start with `$`, include only ASCII letters and can only contain these special characters: -_.*$+:@&=,!~';.
    #
    # for compatibility with actor name, client id can not start with _ and $
    client.identifier.format = "[0-9a-zA-Z-.*+:@&=,!~';.]+[0-9a-zA-Z-_*$%?+:@&=,!~';./]*"
  }

  router {
    #
    # do not turn this on, it is only for development and debug purpose
    verbose = false
    #
    # 0: never use blingd routing, 1: always use blind routing
    blind_routing_threshold = 200
    #
    # majority | local | all | 
    write_consistency_level = local
    write_consistency_timeout = 1s
    #
    # majority | local | all | 
    read_consistency_level = local
    read_consistency_timeout = 1s
  }

  plugin {
    #
    # directory where smqd loads plugin jar files
    #
    dir = "plugins"

    #
    # directory to save plugin instance's config file
    # default is a 'plugins' sub-directory where your smqd.conf file is
    #
    # conf =

    #
    # location of plugin manifest file, default is empty
    # "file://" or "http://"
    #
    # manifest =
  }

  # service component list, user can add custom service compoent class that extends com.thing2x.smqd.Service interface
  services = [core-fault, core-protocol]

  core-fault {
    entry.plugin = thing2x-core-fault-logger
  }

  core-protocol {
    entry.plugin = thing2x-core-protocol-logger
  }

  core-mqtt {
    entry.plugin = thing2x-core-mqtt
  }

  core-api {
    entry.plugin = thing2x-core-api
  }
}

# smqd is using akka as foundation
akka {
  loggers = ["akka.event.slf4j.Slf4jLogger"]
  log-dead-letters = off
  log-dead-letters-during-shutdown = off

  actor {
    provider = local

    serializers {
      java = "akka.serialization.JavaSerializer"
      smq = "com.thing2x.smqd.SmqSerializer"
    }
    serialization-bindings {
      "com.thing2x.smqd.RoutableMessage" = smq
      "io.netty.buffer.ByteBuf" = smq
      "com.thing2x.smqd.FilterPath" = smq
      "com.thing2x.smqd.SmqdRoute" = java
    }
  }

  remote {
    log-remote-lifecycle-events = off
    netty.tcp {
      hostname = 127.0.0.1
      port = 2551
      bind-hotname = 0.0.0.0
      port = 2551
    }
  }

  http {
    server {
      verbose-error-messages = on
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy