Hi

No you cannot set component or endpoint options as headers. Only a
limited number of headers can control the endpoints, and they are
documented in the components that support this.

Once aspect which we don't have but which would have been great, was
that these headers was also marked up with annotations so they could
be enlisted automatic in the documentation and known for 3rd party
tooling.

The activemq/jms component understands the JMS headers, which can
control some aspects. See their documentation.

if you want dynamic to based on header values, then see the toD EIP pattern

On Sat, Nov 16, 2019 at 12:55 PM Wang Yan <wyan...@gmail.com> wrote:
>
> For some component, I could set key and value at the exchange's in or out's
> header instead of
> using the component's option at the endpoint .
>
> For me, it is not very clearly documented, which options could be set at
> in/out /header
>
> set option at endpoint URI
>
> from(xxx) .inOut().to("activemq:queue:foo?replyTo=bar&receiveTimeout=250")
> .to(yyy)
>
> could I set value in the header like below way to
> achieve the same effect?
>
> from(xxx) .inOut()
> .setHeader("replyTo", constant("bar"))
> .setHeader("receiveTimeout", new Integer("250"))
> .to("activemq:queue:foo) .to(yyy)
>
> I hope I explain my meaning clearly enough, any suggestion or feedback is
> more than welcome!



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to