Giter Club home page Giter Club logo

emqx-retainer's Introduction

EMQX Retainer

The retainer plugin is responsible for storing retained MQTT messages.

Configuration

etc/emqx_retainer.conf:

## Where to store the retained messages.
## Notice that all nodes in a cluster are to have the same storage_type.
##
## Value: ram | disc | disc_only
##  - ram: memory only
##  - disc: both memory and disc
##  - disc_only: disc only
##
## Default: ram
retainer.storage_type = ram

## Maximum number of retained messages allowed.
##
## Value: Number >= 0
retainer.max_retained_messages = 1000000

## Maximum payload size of a retained message.
##
## Value: Bytes
retainer.max_payload_size = 64KB

## Expiration interval of the retained messages. Never expire if the value is 0.
##
## Value: Duration
##  - h: hour
##  - m: minute
##  - s: second
##
## Examples:
##  - 2h:  2 hours
##  - 30m: 30 minutes
##  - 20s: 20 seconds
##
## Defaut: 0
retainer.expiry_interval = 0

License

Apache License Version 2.0

Author

EMQX Team

emqx-retainer's People

Contributors

emqplus avatar gilbertwong96 avatar hjianbo avatar huangdan avatar rory-z avatar terry-xiaoyu avatar tigercl avatar turtledeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emqx-retainer's Issues

emqttd not getting all messages when subscriber application is down

Only receiving last retained message when subscriber application restarted.

OS: Windows
EMQ Broker version : 2.3.10
Eclipse paho

When I am publishing 10 messages on same topic, during that time for some reason subscriber application crashed, after sometime sub application restarted, I am getting only last retaining message only and losing all other data which is big problem.

I am putting Retained flag is true , clean session flag as false and Qos as 1 on both pub and sub.

can some one help on this.
Am I missing any configuration or Erlang broker behaves like getting only last retaining message.

Retained messages get lost after EMQTT broker restart.

I have loaded this module in EMQTT broker, all retained messages get lost when I restart the EMQTT broker.

Following is the configuration file for emq-mod-retainer module I am using:

module.retainer.storage_type = disc


module.retainer.max_message_num = 100000


module.retainer.max_payload_size = 64KB


module.retainer.expired_after = 0

Storage path name problem in restart

We try to use emqtt in kubernetes with glusterFs by using storage_type=disc but folder is created differently as 'emqtt@' in restart of service because Ip address changes.
So we try to give IP address as 0.0.0.0 so that it would be same after every restart but still we cannot use retain folder after reboot,
Is there something we are doing wrong or is there a way to reuse retain messages on restart of emqtt

Retained messages still get lost after EMQTT broker restart.

I'm still getting retained messages lost with 2.3.4 EMQ on broker restart.
My configuration:

##--------------------------------------------------------------------
## Retainer Module
##--------------------------------------------------------------------

## Where to store the retained messages.
## Notice that all nodes in a cluster are to have the same storage_type.
##
## Value: ram | disc | disc_only
##  - ram: memory only
##  - disc: both memory and disc
##  - disc_only: disc only
##
## Default: ram
retainer.storage_type = disc

## Maximum number of retained messages allowed.
##
## Value: Number >= 0
retainer.max_message_num = 1000000

## Maximum payload size of a retained message.
##
## Value: Bytes
retainer.max_payload_size = 64KB

## Expiration interval of the retained messages. Never expire if the value is 0.
##
## Value: Duration
##  - h: hour
##  - m: minute
##  - s: second
##
## Examples:
##  - 2h:  2 hours
##  - 30m: 30 minutes
##  - 20s: 20 seconds
##
## Defaut: 0
retainer.expiry_interval = 0

Disk storage location

Where are the retained messages stored on a disk? Can we copy/backup these files and use it on another broker instance ?

What an interesting piece of softwzre

I wish I had found it a year ago.

Can you add a little more to the documentation?

How does this work? How does it share data across RAM and hard drive.
If the server crashes, is the data backed up?
Is there any api? Can I edit the data files?
Are there data files.

Right now it just appears to me to be a black box, so I have no judgement on how it performs,
how well it distributes, what its limitations are.

Tough to decide if I should use it or not.

I am tempted to use topic tracing to a RAM disk. How does this ocmpare?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.