Is there a way to use global middleware to stop event processing?
See original GitHub issueThe docs for Global middleware say:
Both global and listener middleware must call
next()
to pass control of the execution chain to the next middleware.
I’m looking for a way to use global middleware as a type of “event filter”. For example, one use case is checking a list of users that the bot should ignore. Having a way to do this globally (basically, a way to “stop event processing, don’t continue”) would be easier than having to set a flag in the context
dict and checking it in every event handler.
Thanks for any insight.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Middleware - Laravel - The PHP Framework For Web Artisans
The withoutMiddleware method can only remove route middleware and does not apply to global middleware. Middleware Groups. Sometimes you may want to group ......
Read more >Global Error Handling in ASP.NET Core Web API - Code Maze
In this article, we are going to handle errors by using a try-catch block first and then rewrite our code by using built-in...
Read more >Complete Guide to Express Middleware - Reflectoring
Middleware functions access the HTTP request and response objects. They either terminate the HTTP request or forward it for further processing ...
Read more >ASP.NET Core Middleware | Microsoft Learn
Each middleware component in the request pipeline is responsible for invoking the next component in the pipeline or short-circuiting the ...
Read more >6 Event Processing Samples in Oracle Event Processing
Oracle CQL: Shows how to use the Oracle Event Processing Visualizer Query ... The sample HelloWorld domain is located in /Oracle/Middleware/my_oep/oep/ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you, Kazuhiro-san, for your time and explanations!
Sorry, the above comment was initially confusing. I’ve updated it.