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

Hello JP,

On Tue, Sep 6, 2016 at 5:52 PM, Jan-Piet Mens <jpmens.dns@xxxxxxxxx> wrote:
>> Is there some other way of getting the message data from Mosquitto
>> (without being subscriber)?
>
>
> Not without modifying Mosquitto's source code. I actually looked at doing it
> and determined it wouldn't be too difficult

Would it be correct to say that code that pushes message to the
database has to be added somewhere around here:
https://github.com/eclipse/mosquitto/blob/master/src/read_handle.c#L217,
i.e. in function mqtt3_handle_publish() if publish has been accepted.

Do you see any other place where code has to be added, or something
else to think about?

> the subscriber model works well at the message volumes we cater for.

Out of curiosity, what is the message throughput you cater for? And is
it in single-node scenario or in bridged mode? Because in single-node
scenario subscribtion to `#` is completely valid. But in multi-node,
where nodes are bridged and behind load balancer subscribing to `#`
puts all the load to one node and in that case scaling have no sense.

BR,
Drasko


Back to the top