Re: component options setting vs exchange 's in /out header setting
To make it simple to use, if the options provided, the used in URL. If not, then you can use it in headers Sent from Weiquan > On Nov 16, 2019, at 6:59 AM, Claus Ibsen wrote: > > 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 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=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
Re: component options setting vs exchange 's in /out header setting
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 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=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
component options setting vs exchange 's in /out header setting
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=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!
Re: Component options
No you can get the options of a component via its instance type, eg HttpComponent has getter/setter for all its options. To set default values on components you do as in (2) or if you use spring-boot you can set them via SB auto configuration etc. On Fri, Nov 23, 2018 at 9:24 PM ski n wrote: > > I have two questions regarding Component options: > > 1) Is it possible to get all options as a Map > > From the context it's possible to get component: > > context.getComponent("componentName"); > > It also possible to get the Component documentation like > > context.getComponentDocumentation("componentName"); > > or in later version from the catalog: > catalog.componentHtmlDoc(componentType); > > or use context.explainComponentJson(componentName, includeAllOptions) > > However this returns documents (HTML/JSON). I would like to have a > Map return like getting the globaloptions: > > context.getGlobalOptions() > > For example: > > context.getComponentOptions("componentName"); > > > 2) Is it possible to set another default? > > I like to change some of the defaults for components. I know I can do > something like this: > > HttpComponent http = context.getComponent("http4", HttpComponent.class); > http.setConnectionTimeToLive(5000); > > Is there also a more direct way. For example: > > context.setComponentOption("componentName","option","value"); > > Raymond -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Component options
I have two questions regarding Component options: 1) Is it possible to get all options as a Map >From the context it's possible to get component: context.getComponent("componentName"); It also possible to get the Component documentation like context.getComponentDocumentation("componentName"); or in later version from the catalog: catalog.componentHtmlDoc(componentType); or use context.explainComponentJson(componentName, includeAllOptions) However this returns documents (HTML/JSON). I would like to have a Map return like getting the globaloptions: context.getGlobalOptions() For example: context.getComponentOptions("componentName"); 2) Is it possible to set another default? I like to change some of the defaults for components. I know I can do something like this: HttpComponent http = context.getComponent("http4", HttpComponent.class); http.setConnectionTimeToLive(5000); Is there also a more direct way. For example: context.setComponentOption("componentName","option","value"); Raymond
RE: Add component options to camel-ahc component
Hi, I am not sure whether I understand your question correctly. https://example.com/v1/hello?apiKey=a=false will set the throwExceptionOnFailure endpoint option to false (and forward the apiKey parameter to the server). Component options are set on the component level and apply to all endpoints unless they are overwritten by endpoint options. Best regards Stephan -Original Message- From: prabhuj [mailto:prabhu.undefi...@gmail.com] Sent: Dienstag, 4. Oktober 2016 15:45 To: users@camel.apache.org Subject: Add component options to camel-ahc component If my endpoint is "https://example.com/v1/hello?apiKey=a;, How do i add ahc component options (e.g., throwExceptionOnFailure) ? https://example.com/v1/hello?apiKey=a=false ? How would ahc differentiate the actual endpoint vs component options ? -- View this message in context: http://camel.465427.n5.nabble.com/Add-component-options-to-camel-ahc-component-tp5788349.html Sent from the Camel - Users mailing list archive at Nabble.com.
Add component options to camel-ahc component
If my endpoint is "https://example.com/v1/hello?apiKey=a;, How do i add ahc component options (e.g., throwExceptionOnFailure) ? https://example.com/v1/hello?apiKey=a=false ? How would ahc differentiate the actual endpoint vs component options ? -- View this message in context: http://camel.465427.n5.nabble.com/Add-component-options-to-camel-ahc-component-tp5788349.html Sent from the Camel - Users mailing list archive at Nabble.com.
Kafka Component options question
Reading Camel Kafka component documentation below: http://camel.apache.org/kafka.html What does consumerStreams mean/does in options? Sadly there is absolutely not documentation or further explanation on this. Thanks, Adrian This e-mail and its contents (to include attachments) are the property of National Health Systems, Inc., its subsidiaries and affiliates, including but not limited to Rx.com Community Healthcare Network, Inc. and its subsidiaries, and may contain confidential and proprietary or privileged information. If you are not the intended recipient of this e-mail, you are hereby notified that any unauthorized disclosure, copying, or distribution of this e-mail or of its attachments, or the taking of any unauthorized action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, please immediately notify the sender by telephone at 800-433-5719 or return e-mail and permanently delete the original e-mail.