Can the Delay node rate limit, but pass first message immediately, and always pass on the latest message?

Sorry for being AWOL for a time. Real life took priority.

It is the former, there must be at least 5 seconds interval between every message sent.
As I said in the first post, it is nearly achievable with the Delay node in Rate Limit, and Each msg.topic mode. In that mode it queues the most recent message for each topic and releases it at the next time interval. It does not satisfy the requirement that if more than five seconds has elapsed since the last message was sent then one coming in should be passed on immediately. So another way to look at the spec is the addition of a feature to the Delay node that in All Messages mode there is an option to queue the most recent message rather than just discard them all.

The reason for the question (as mentioned earlier) was to help with the previously linked thread. In fact that was fixed satisfactorily with one of the earlier suggestions, as the possible race conditions did not matter for that specific application. It then became a matter of intellectual interest, to see whether it could be reasonably easily solved without resorting to a function node (or DSM node), plus I can see that it does have uses (as in the other thread). I think it is clear that, though it may well be possible with nodes, any solution will be rather complex and difficult to understand, so I think probably a Function node is the best way to go. Alternatively an enhancement to the Delay node would be good to add this feature. Unfortunately I haven't got into the development of core nodes so would need to spend some time getting that sorted, and I just don't have the time at the moment.