New
Graceful shutdown
Thanks for @rmccallum81, ServiceBroker supports graceful shutdown. You can enable it with trackContext
broker option. If you enable it, all services wait for all running contexts before shutdowning. You can also define a timeout value with gracefulStopTimeout
broker option.
const broker = new ServiceBroker({
trackContext: true,
gracefulStopTimeout: 5 * 1000 // waiting max 5 sec
});
This timeout can be overwrite in service settings with $gracefulStopTimeout
property.
Changes
- fix service registry update after reconnecting. #262
- update index.d.ts
- update dependencies
- fix distributed timeout handling