-
Notifications
You must be signed in to change notification settings - Fork 5
Feature/add middleware #18
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
Conversation
mm-gmbd
commented
May 4, 2017
- Added four middleware functions:
- beforeOnAck - gets called prior to “onAck” callbacks being fired
- beforeOnReply - gets called prior to “onReply” callbacks being fired
- beforeOnData - gets called prior to any “on” callbacks being fired
- beforeReply - gets called before a reply is sent
- Added four middleware functions: - beforeOnAck - gets called prior to “onAck” callbacks being fired - beforeOnReply - gets called prior to “onReply” callbacks being fired - beforeOnData - gets called prior to any “on” callbacks being fired - beforeReply - gets called before a reply is sent
|
For some reason, I can open a PR on the master branch, but not the develop branch (which I originally branched from). GH not working out well for me today. Let me know what you think (although I think this is very similar to #15) |
|
Max can you provide the use case for adding middleware. This feels like it is adding a lot of complexity. Thanks. |
|
Hey @betzrhodes, the request originally was borne out a need to perform some profiling Agent<->Device communication, and rather than tracking down every single At this very moment, the need has been somewhat reduced, but I could still see this being useful into the future (again, moreso around general profiling to provide early identification of potential system degradation, etc). Can you explain the foreseen complexity? As far as actual implementation goes, it doesn't really add much in the way of extra code (just registers a few callbacks and calls them appropriately), and, from what I recall, it doesn't alter the overall flow (i.e. doesn't provide the ability to "drop" messages, etc), it just gives a way to access all messages at different points in the flow. |
|
Can one of the admins verify this patch? |
|
Merged to mm branch to keep code. Currently no plans to merge this feature into a release. |