How to calculate 2 msg.id coming from 2 pub different topics simulataneously

Hi @shipra

before you can compare the two values you'll need to get them into a single message.

There is a recipe for joining separate streams of messages together in the cookbook - https://cookbook.nodered.org/basic/join-streams

That recipe shows how to join separate messages together, but it does assume the value you want to combine is in msg.payload. So you may need to use a Change node to move the value of msg.id to msg.payload before passing to the Join node.