Hmm... still getting an error:
(pxb/create :type :executor
:concurrency 1
:queue 16
:executor (px/cached-executor))
=> Execution error (NullPointerException) at promesa.exec.bulkhead/create-with-executor (bulkhead.clj:173).
All right, I figured it out. Must supply :permits to pxb/create:
This is the minimal example that works:
(pxb/create _:type :executor_
_:permits_ 1)
With no :executor provided ends up resolving java.util.concurrent.ForkJoinPool
Documentation on this seems to be out of date.
The error was happening when creating semaphore on this line: https://github.com/funcool/promesa/blob/be4ea194dfce9c1d39e39abed335be62c861c7f3/src/promesa/exec/bulkhead.clj#L176
If :permits not supplied end up with (int nil) which throws. Perhaps the intention was to use max-permits? Not sure though.
Judging from the code the correct and relevant keys for pxb/create are :type :executor :permits :queue .