VerneMQ
  • Welcome
  • Getting Started
  • MQTT Introduction
  • Installing VerneMQ
    • Running VerneMQ using Docker
  • Configuring VerneMQ
    • Introduction
    • The VerneMQ conf file
    • Auth using files
    • Auth using a database
    • Enhanced Auth
    • MQTT Options
    • MQTT Listeners
    • HTTP Listeners
    • Non-standard MQTT options
    • Websockets
    • Logging
    • Consumer session balancing
    • Plugins
    • Shared subscriptions
    • Advanced Options
    • Storage
    • No Op Engine
    • Generic offline store
    • Redis based message passing
    • Redis based subscription store
    • MQTT Bridge
  • VerneMQ Clustering
    • Introduction
    • Inter-node Communication
    • Dealing with Netsplits
  • Live Administration
    • Introduction
    • Inspecting and managing sessions
    • Retained messages
    • Live reconfiguration
    • Managing Listeners
    • HTTP API
    • Tracing
  • Monitoring
    • Introduction
    • $SYSTree
    • Graphite
    • Netdata
    • Prometheus
    • Health Checker
    • Status Page
  • Plugin Development
    • Introduction
    • Session lifecycle
    • Subscribe Flow
    • Publish Flow
    • Enhanced Auth Flow
    • Erlang Boilerplate
    • Lua Scripting Support
    • Webhooks
    • Events sidecar Plugin
  • Misc
    • Loadtesting VerneMQ
    • Not a tuning guide
    • Change Open File Limits
  • Guides
    • A typical VerneMQ deployment
    • VerneMQ on Kubernetes
    • Loadtesting VerneMQ
    • Clustering during development
    • Not a tuning guide
    • Change Open File Limits
Powered by GitBook
On this page
  • Offline store engine
  • Offline store host
  • Offline store port
  • Offline store database
  • Offline store connect timeout
  • Offline store query timeout
  1. Configuring VerneMQ

Generic offline store

Configure offline message store.

In the vanilla VerneMQ(1.11.0) on netsplit, the broker state had to be cleared before restoration which led to loss of offline messages stored in leveldb using vmq_generic_message_store plugin. Since this kind of persistence is actually not useful so no-op engine was introduced which bypass this persistence step and helped in quick recovery of broker as there was no message state to be loaded in memory.

Using offline message store, only offline messages are persisted for the offline clients. In order to use offline message store, message store plugin needs to be explicitly configured.

message_store_plugin = vmq_generic_offline_msg_store

Currently two offline store engines are available, postgres and redis sentinel.

Offline store engine

Specify the engine to be used for storage.

offline_message_store_engine = vmq_offline_storage_engine_redis

Offline store host

For redis sentinel engine, all the hosts(master and slaves) can be specified in a list format, ["host1", "host2"]

offline_message_store_opts.host = localhost

Offline store port

Specify the port on which the offline store is listening.

offline_message_store_opts.port = 6379

Offline store database

Specify the name of the database to be used as offline store.

offline_message_store_opts.database = 2

Offline store connect timeout

Specify the connect timeout (in milliseconds).

offline_message_store_opts.connect_timeout = 4000

Offline store query timeout

Specify the query timeout (in milliseconds).

offline_message_store_opts.query_timeout = 2000
PreviousNo Op EngineNextRedis based message passing

Last updated 2 years ago