If an actor reacts on some message type (response), when actor sends an request we'd like to invoke specific to the response handler.
One obvious solution will be to include request message into response, and do some if in actor. Not very nice.
Another solution is to generate an new address, let the actor subscribes to the address, and let the actor sets this ephemeral address as reply_to in the request. That works, however what about fail-case? Also if there is an undefined number of such req/res, how to manage them?
If an actor reacts on some message type (response), when actor sends an request we'd like to invoke specific to the response handler.
One obvious solution will be to include request message into response, and do some
if
in actor. Not very nice.Another solution is to generate an new address, let the actor subscribes to the address, and let the actor sets this ephemeral address as
reply_to
in the request. That works, however what about fail-case? Also if there is an undefined number of such req/res, how to manage them?Some pattern should be developed in
rotor::core