-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add agent middleware #97
Comments
This would be a nice enhancement @TimoGlastra . AF .NET also does the same way I described. .. and the implementation is in Happy to discuss if there are other ideas, or if I am missing something here.. |
I'd suggest having the middleware execute both, before the call to the handler and after the result of the handler is handled (i.e. outgoing message is sent). The latter would specially be useful for scenarios where we need to be certain that the other party has received the message. |
We discussed & agreed in today's meeting that the middleware implementation will be runtime-agnostic. So that it may be consumed in Node.js Express, Deno or React-Native. |
@TimoGlastra @ajile-in @gnarula Sir do we have any library currently available in AFJ, from which we can apply custom logic to all incoming messages like the IAgentMiddleware in .NET ? |
As a developer I sometimes want to apply custom logic for all incoming messages. We already have handlers that allow to implement logic for a custom message type. I think it would be beneficial to introduce the concept of middleware into aries-framework-javascript.
aries-framework-dotnet also implements the concept of middleware which we can take as an example
Checklist
AgentMiddleware
interfaceDispatcher
would be the best place to call middlewareAgent
(likeregisterHandlers
)Questions
Use cases
Probably a lot more, but this are two I can think of at the moment.
The text was updated successfully, but these errors were encountered: