It would be nice to have an access to a message in method handler. Currently, we only have message body but sometimes you need to know, for example, who is sending the message (sender). It can be added without a breaking change by adding it as a last argument:
class ExampleInterface extends Interface {
// ....
@method({inSignature: 's', outSignature: 's'})
Echo(what, message) {
return what;
}
// Or it can be an object that contains any other additional info
@method({inSignature: 's', outSignature: 's'})
Echo(what, { message }) {
return what;
}
}
It would be nice to have an access to a message in method handler. Currently, we only have message body but sometimes you need to know, for example, who is sending the message (sender). It can be added without a breaking change by adding it as a last argument: