Class OnFallbackDefinition

All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.LineNumberAware, Block, OutputNode, org.apache.camel.NamedNode, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.HasId, org.apache.camel.spi.IdAware

@Metadata(label="eip,routing") public class OnFallbackDefinition extends ProcessorDefinition<OnFallbackDefinition> implements OutputNode
Route to be executed when Circuit Breaker EIP executes fallback
  • Constructor Details

    • OnFallbackDefinition

      public OnFallbackDefinition()
  • Method Details

    • getOutputs

      public List<ProcessorDefinition<?>> getOutputs()
      Specified by:
      getOutputs in class ProcessorDefinition<OnFallbackDefinition>
    • setOutputs

      public void setOutputs(List<ProcessorDefinition<?>> outputs)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getShortName

      public String getShortName()
      Specified by:
      getShortName in interface org.apache.camel.NamedNode
    • getLabel

      public String getLabel()
      Description copied from class: ProcessorDefinition
      Returns a label to describe this node such as the expression if some kind of expression node
      Specified by:
      getLabel in interface org.apache.camel.NamedNode
      Overrides:
      getLabel in class ProcessorDefinition<OnFallbackDefinition>
    • getFallbackViaNetwork

      public String getFallbackViaNetwork()
    • setFallbackViaNetwork

      public void setFallbackViaNetwork(String fallbackViaNetwork)
      Whether the fallback goes over the network.

      If the fallback will go over the network it is another possible point of failure. It is important to execute the fallback command on a separate thread-pool, otherwise if the main command were to become latent and fill the thread-pool this would prevent the fallback from running if the two commands share the same pool.