Better supports for Events API on FaaS
See original GitHub issueDescription
Related to #361, I would like to introduce a new option to AppOptions
in the next minor version or Bolt 2.
I would love to get you all’s suggestions for better naming but it is a flag to turn on/off the automatic Events API request acknowledgment. It allows developers to customize the behavior here: https://github.com/slackapi/bolt/blob/%40slack/bolt%401.5.0/src/App.ts#L474-L475
If we go with a name like autoEventAck
, the default value is supposed to be true
. If a developer set it as false
, the app.event
listener has ack
function and it’s expected to call it for sure.
This is necessary to run Bolt apps safely on FaaS (Function-as-a-Service). Without this, Events API handlers may unexpectedly be terminated even while they’re still running.
What type of issue is this? (place an x
in one of the [ ]
)
- bug
- enhancement (feature request)
- question
- documentation related
- testing related
- discussion
Requirements (place an x
in each of the [ ]
)
- I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
- I’ve read and agree to the Code of Conduct.
- I’ve searched for any related issues and avoided creating a duplicate issue.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Better supports for Events API on FaaS · Issue #395 - GitHub
My biggest concern is introducing an option for this behavior makes sample code, middleware, and documentation less portable.
Read more >Event-Driven Architecture: FaaS, Streams and Serverless
When item events are sent to the system, they are received via a FaaS function. This function will validate, enrich and either reject...
Read more >Triggers - OpenFaaS
The OpenFaaS event-pattern allows you to create a broker or separate microservice which maps functions to topics and invokes functions via the OpenFaaS...
Read more >What is FaaS (Function-as-a-Service)? - IBM
FaaS, or Function-as-a-Service, is a cloud-computing service that allows customers to execute code in response to events, without managing the complex ...
Read more >What is FaaS? Function as a Service explained | DigitalOcean
Function as a Service, or FaaS, is a subset of serverless computing that's focused on event-driven triggers. Learn the benefits of FaaS and ......
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
My biggest concern is introducing an option for this behavior makes sample code, middleware, and documentation less portable. If some apps have the option set to the opposite of the default, they have to be very careful to comb through all their code to modify
.event()
listenerse (and middleware which operate on events) to do the right thing. In documentation, we’ll have to add caveats about this in many places.I think the optionality will fragment our audience and increase our effort. Is that worth it?
Why can’t the FaaS implementation send responses after the event is fully processed (which it can in v2)? Even the
.action()
listeners who callack()
shouldn’t actually send the response until the event is fully processed. This alternate behavior can be full encapsulated in aReceiver
implementation.Agreed. The issue for the bug is #462 (for reference)