Annotation Interface Consume


@Retention(RUNTIME) @Documented @Target(METHOD) public @interface Consume
Subscribes a method to an Endpoint either via its URI or via the name of the endpoint reference which is then resolved in a registry such as the Spring Application Context.

When a message Exchange is received from the Endpoint then the Bean Integration mechanism is used to map the incoming Message to the method parameters.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Optional predicate (using simple language) to only consume if the predicate matches .
    Use the field or getter on the bean to provide the uri to consume from
    The uri to consume from
  • Element Details

    • value

      String value
      The uri to consume from
      Default:
      ""
    • property

      String property
      Use the field or getter on the bean to provide the uri to consume from
      Default:
      ""
    • predicate

      String predicate
      Optional predicate (using simple language) to only consume if the predicate matches . This can be used to filter messages.

      Notice that only the first method that matches the predicate will be used. And if no predicate matches then the message is dropped.

      Default:
      ""