Open dvinubius opened 2 months ago
Can't you use the built-in Pushed-For
for that purpose? (it is the Message-Id that any message was pushed for)
@kprimice Pushed-For
propagates in a longer message chain. If the Request-Type message is sent as a consequence of handling another message, then the Response-Type message that follows will have a Pushed-For
with the ID of the initial message.
The proposed solution is more focused on a single request-response message exchange, regardless of the broader message handling context
Any reason, not to use Reference
and X-Reference
local response = Send({...}).receive()
-- process response?
or
Send({...}).onReply(function (msg)
-- do stuff
end)
This is currently in preview (Release Candidate) if you want to try
Solves https://github.com/permaweb/aos/issues/290
Any response message is tagged with
["Response-For"] = <Name-Of-The-Action>
in order to be more easily matchable by the receiver of the response.