Nav
You are viewing an older version of this section. Click here to navigate to the latest version.

Outbound Headers

The @OutboundHeaders annotation is used on @Processor methods to mark a parameter that will be populated with outbound headers that will be set with the outgoing message. For example, when sending an email message, you may want to set properties such as "from" or "subject" as a sender header. This annotation must only be defined on a parameter of type java.util.Map.

Restrictions

A method annotated with @Processor can have at most one parameter annotated with @Payload, @InboundHeaders, @InvocationHeaders or @OutboundHeaders.

For example this is not possible:


         
      
1
2
@Processor
   public Object myMethod(@Payload Object payload, @OutboundHeaders Map<String, Object> headers) {

In this topic: