Thread Pool Bulkhead
Thread-pool-isolation bulkhead (JVM). Admitted calls run on a dedicated fixed-size thread pool of BulkheadConfig.maxConcurrentCalls threads, so slow or blocking calls can never consume threads outside the pool.
Must be closed to release its threads.
ThreadPoolBulkhead.create("payments", BulkheadConfig(maxConcurrentCalls = 8)).use { b ->
b.execute { blockingJdbcCall() }
}Content copied to clipboard
Types
Link copied to clipboard
object Companion
Factory for ThreadPoolBulkhead.
Functions
Link copied to clipboard
Returns the current number of active calls.
Link copied to clipboard
Adds a listener for bulkhead events.
Link copied to clipboard
Link copied to clipboard
Returns a snapshot of the current statistics.
Link copied to clipboard
Like execute but returns null when rejected.