Efficiency with multiple MQTT subscriptions from same broker?

I've ended up with five subscription topics from the same MQTT broker in my flow as it has evolved. It is working great, but I'm wondering if its worth the effort (beyond perhaps making the flow look a bit "cleaner" in the editor) to convert to a single MQTT input node and then run a switch node to route the five topics to the flow as opposed to having five MQTT input nodes scattered about in the flow.

Multiple MQTT input nodes sure are convenient for development as a flow evolves, but are there any real disadvantages to to doing it this way?

1 Like

Not at all - MQTT nodes just sit and wait for messages - if there's little traffic then there's little work for them to do

I'm using 36 of them on one of my PiZero - -current cpu load is 6%

2 Likes

I agree with Simon, not sure how many MQTT nodes I'm using but it is quite a lot. I probably have 10-15 main topics and some of those have sub-topic structures too.

I do sometimes rationalise the listeners though but that is mainly to make sure the flows are consistent.

1 Like

Thanks! good to know that changing my flow will not be worthwhile. That is why I wanted to ask first.

1 Like