I know I am asking for it by asking, but in light of wanting to learn.....
It probably isn't the reason, but I want to be sure.
My poor RPI is (I am told) running way to hard (60-70% load peaking.)
Now and then it goes up to 100% but only for a while.
Anyway, here's my question:
(Example code only)
(Hand written not real code, but only for showing the problem as I see it)
var x = msg.payload;
if (x == "foo")
{
msg.payload = "Option 1";
return msg;
}
else
if (x == "boo")
{
msg.payload = "Option 2";
return msg;
}
Which has not worried me until now.
If the message is neither "foo" or "boo" then nothing is sent.
That is what is wanted/needed.
Until know I thought (stupidly) that you had to return msg;
But a simple return
is also allowed.
Though I have to admit, I don't get what is returned.
If I have a few (dozen) nodes without the final return
would that cause problems?
Gotta ask to be sure.