Skip to content

custom order of fault tolerance strategies in programmatic API #594

@Ladicek

Description

@Ladicek

The MicroProfile Fault Tolerance specification prescribes order in which fault tolerance strategies must apply. That's fine (and there's no other way) for the declarative API, but the programmatic API should offer a way to customize the order. In such case, certain fault tolerance strategies can even apply multiple times (fallback most importantly, because in the middle of the fault tolerance strategies chain, there's no other way how to handle exceptions). I'm thinking something like FaultTolerance.create().customOrder()...:

  • customOrder() must be called before any fault tolerance strategy is added
  • if called, order of adding strategies to the builder becomes meaningful -- it is the order in which the strategies will be applied

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions