Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Storing all Messages in Database - Avoiding Single Subscriber `#` Anti-pattern

On Tue, Sep 6, 2016 at 1:10 PM, Drasko DRASKOVIC
<drasko.draskovic@xxxxxxxxx> wrote:
> Hello,
> in relation to this:
> https://groups.google.com/forum/#!topic/rabbitmq-users/KVMNkAsW-ac, I
> would like to understand if there is a way to take all the message
> data from all Mosquitto nodes in a bridged cluster and store them into
> database without passing via subscription to `#` topic which would
> cause that all messages are routed through one "hot" node - which
> defeats purpose of clustering.

It is strange though that in the official examples I find exactly the
Single Subscriber anti-pattern:
https://github.com/eclipse/mosquitto/blob/master/examples/mysql_log/mysql_log.c,
line:

mosquitto_subscribe(mosq, NULL, "#", 0);

This will not scale.

Is there some other way of getting the message data from Mosquitto
(without being subscriber)?

BR,
Drasko


Back to the top