This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit bda09e84ac62ef0f2ba6eb7787fefa728eb7196a Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Mon Sep 21 18:45:51 2020 +0200 Regen website docs --- .../ROOT/pages/aws2-eventbridge-component.adoc | 52 ++++++++++++++++++++++ .../modules/ROOT/pages/properties-component.adoc | 10 ++--- 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc index da8b2c4..0630939 100644 --- a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc +++ b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc @@ -114,6 +114,58 @@ with the following path and query parameters: |=== // endpoint options: END +=== AWS2-Eventbridge Producer operations + +Camel-AWS2-Eventbridge component provides the following operation on the producer side: + +- putRule +- putTargets + +- PutRule: this operation create a rule related to an eventbus + +[source,java] +-------------------------------------------------------------------------------- + from("direct:putRule").process(new Processor() { + + @Override + public void process(Exchange exchange) throws Exception { + exchange.getIn().setHeader(EventbridgeConstants.RULE_NAME, "firstrule"); + } + }) + .to("aws2-eventbridge://test?operation=putRule&eventPatternFile=file:src/test/resources/eventpattern.json") + .to("mock:result"); +-------------------------------------------------------------------------------- + +This operation will create a rule named firstrule and it will use a json file for defining the EventPattern. + +- PutTargets: this operation will add a target to the rule + +[source,java] +-------------------------------------------------------------------------------- + from("direct:start").process(new Processor() { + + @Override + public void process(Exchange exchange) throws Exception { + exchange.getIn().setHeader(EventbridgeConstants.RULE_NAME, "firstrule"); + Target target = Target.builder().id("sqs-queue").arn("arn:aws:sqs:eu-west-1:780410022472:camel-connector-test") + .build(); + List<Target> targets = new ArrayList<Target>(); + targets.add(target); + exchange.getIn().setHeader(EventbridgeConstants.TARGETS, targets); + } + }) + .to("aws2-eventbridge://test?operation=putTargets") + .to("mock:result"); +-------------------------------------------------------------------------------- + +This operation will add the target sqs-queue with the arn reported to the targets of the firstrule rule. + +== Automatic detection of EventbridgeClient client in registry + +The component is capable of detecting the presence of an EventbridgeClient bean into the registry. +If it's the only instance of that type it will be used as client and you won't have to define it as uri parameter, like the example above. +This may be really useful for smarter configuration of the endpoint. + == Dependencies Maven users will need to add the following dependency to their pom.xml. diff --git a/docs/components/modules/ROOT/pages/properties-component.adoc b/docs/components/modules/ROOT/pages/properties-component.adoc index 917c347..a254e07 100644 --- a/docs/components/modules/ROOT/pages/properties-component.adoc +++ b/docs/components/modules/ROOT/pages/properties-component.adoc @@ -13,7 +13,7 @@ The properties component is used for property placeholders in your Camel application, such as endpoint URIs. It is *not* a regular Camel component with producer and consumer for routing messages. However for historical -reasons it was named `PropertiesComponent` and this name is commonly known and therefore we keep using it. +reasons it was named `PropertiesComponent` and this name is commonly known and therfore we keep using it. == Spring Boot Auto-Configuration @@ -67,7 +67,7 @@ The property placeholder is generally in use when doing: * using Blueprint PropertyPlaceholder with Camel xref:properties-component.adoc[Properties] component * using `@PropertyInject` to inject a property in a POJO -* Using default value if a property does not exist +* Using default value if a property does not exists * Include out of the box functions, to lookup property values from OS environment variables, JVM system properties, or the service idiom. @@ -104,7 +104,7 @@ with comma such as: pc.setLocation("com/mycompany/myprop.properties,com/mycompany/other.properties"); ---- -You can set which location can be discarded if missing by setting the ``optional`` attribute, which is false by default, i.e: +You can set which location can be discarded if missing by by setting the ``optional`` attribute, which is false by default, i.e: [source,java] ---- @@ -186,7 +186,7 @@ fresh such as: </camelContext> ---- -Setting the properties location through the location tag works just fine but sometimes you have a number of resources to take into account and starting from *Camel 2.19.0* you can set the properties location with a dedicated propertiesLocation: +Setting the properties location through the location tag works just fine but sometime you have a number of resources to take into account and starting from *Camel 2.19.0* you can set the properties location with a dedicated propertiesLocation: [source,xml] ---- @@ -434,7 +434,7 @@ Notice how we can use the Camel syntax for placeholders `{{` and `}}` in the Camel route, which will lookup the value from OSGi blueprint. The blueprint syntax for placeholders is `${ }`. So outside the -`<camelContext>` you must use the `${ }` syntax. Whereas inside +`<camelContext>` you must use the `${ }` syntax. Where as inside `<camelContext>` you must use `{{` and `}}` syntax. OSGi blueprint allows you to configure the syntax, so you can actually