You could pass the message through a switch node set to equals previous payload.
e.g.
[{"id":"00e5cf23448a2121","type":"switch","z":"452103ea51141731","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"","vt":"prev"}],"checkall":"true","repair":false,"outputs":1,"x":250,"y":860,"wires":[["8b685ae0571bd80d"]]},{"id":"e79d2b295950adc1","type":"inject","z":"452103ea51141731","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"a","payloadType":"str","x":110,"y":840,"wires":[["00e5cf23448a2121"]]},{"id":"ec76edf4ddfc8ce7","type":"inject","z":"452103ea51141731","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"b","payloadType":"str","x":90,"y":900,"wires":[["00e5cf23448a2121"]]},{"id":"8b685ae0571bd80d","type":"debug","z":"452103ea51141731","name":"debug 98","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":440,"y":880,"wires":[]}]