Repository navigation
Replies: 2 comments 4 replies
|
Thanks @xgp, all five points are addressed on my branch and will go up as a small PR series. Please give this branch a try with your SCIM implementation: https://github.com/thomasdarimont/keycloak/tree/poc/outbox-improvements Here is what I changed:
On your SPI question: handlers and listeners now receive a read-only For your SCIM provider the relevant knobs are IMHO the per-owner batch cap, the tick budget, and defer for rate-limited targets. Please give it a try. |
|
@thomasdarimont SCIM outbox PR against your branch thomasdarimont#1253 |
Uh oh!
There was an error while loading. Please reload this page.
@thomasdarimont, following up on our conversation at KeyConf26 yesterday about using the outbox you built for SSF for other kinds of guaranteed delivery.
I maintain an outbound SCIM provisioning extension (pushing users and groups from Keycloak to SaaS apps) that I'd like to contribute upstream. It had its own outbox; I've moved its storage onto
OutboxStoreandOUTBOX_ENTRY(one row per change, its own entry kind), and it now runs alongside SSF's drainer with neither touching the other's rows. To useOutboxDrainerTaskitself as well, a second consumer needs the following. I'm happy to send PRs for any of them.ClusterAwareScheduledTaskRunnerkeys its lock bytask.getClass().getSimpleName(), so everyOutboxDrainerTaskin a cluster, SSF's included, shares the key"OutboxDrainerTask". A second consumer scheduled the same way would make one of the two skip its ticks. Proposal: derive the key from theentryKind, for exampleoutbox:<entryKind>.RETRYalways incrementsATTEMPTS;SsfPushDeliveryHandlerhas a comment asking for exactly this. Proposal:OutboxDeliveryResult.defer(Instant notBefore, String reason), which reschedules without counting an attempt. That covers a receiver that's temporarily down, rate limiting, and waiting on a dependency.lockDueForDrain(kind, ownerId, limit), which respectsNEXT_ATTEMPT_AT(IDX_OUTBOX_OWNERalready covers it), and an option for a drainer to work per owner.DEAD_LETTERorDELIVEREDback toPENDING), which doubles as a replay API;Items 1 and 2 seem small and would help SSF as well. Would you take PRs for those first? I'd also like your view on 3 and 4, and on whether the outbox should become a documented SPI for other consumers.
cc @ssilvert @pedroigor
All reactions