[camel-spring-boot] branch master updated: CAMEL-16003: camel-spring-rabbitmq - New component using spring client

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[camel-spring-boot] branch master updated: CAMEL-16003: camel-spring-rabbitmq - New component using spring client

davsclaus-2
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/master by this push:
     new f72a1d1  CAMEL-16003: camel-spring-rabbitmq - New component using spring client
f72a1d1 is described below

commit f72a1d126319fcc021a98e1493200ac899abc8a4
Author: Claus Ibsen <[hidden email]>
AuthorDate: Wed Jan 13 11:06:28 2021 +0100

    CAMEL-16003: camel-spring-rabbitmq - New component using spring client
---
 .../springboot/catalog/components/spring-rabbitmq.json   |  2 +-
 .../src/main/docs/spring-rabbitmq-starter.adoc           |  2 ++
 ...ava => SpringRabbitMQComponentAutoConfiguration.java} | 16 ++++++++--------
 ...on.java => SpringRabbitMQComponentConfiguration.java} |  2 +-
 ...verter.java => SpringRabbitMQComponentConverter.java} |  5 +++--
 .../src/main/resources/META-INF/spring.factories         |  2 +-
 docs/modules/ROOT/pages/spring-rabbitmq-starter.adoc     |  4 +++-
 7 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/spring-rabbitmq.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/spring-rabbitmq.json
index 27d421f..3ea781a 100644
--- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/spring-rabbitmq.json
+++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/spring-rabbitmq.json
@@ -7,7 +7,7 @@
     "deprecated": false,
     "firstVersion": "3.8.0",
     "label": "messaging",
-    "javaType": "org.apache.camel.component.springrabbit.RabbitMQComponent",
+    "javaType": "org.apache.camel.component.springrabbit.SpringRabbitMQComponent",
     "supportLevel": "Preview",
     "groupId": "org.apache.camel.springboot",
     "artifactId": "camel-spring-rabbitmq-starter",
diff --git a/components-starter/camel-spring-rabbitmq-starter/src/main/docs/spring-rabbitmq-starter.adoc b/components-starter/camel-spring-rabbitmq-starter/src/main/docs/spring-rabbitmq-starter.adoc
index 7d19325..0bd8593 100644
--- a/components-starter/camel-spring-rabbitmq-starter/src/main/docs/spring-rabbitmq-starter.adoc
+++ b/components-starter/camel-spring-rabbitmq-starter/src/main/docs/spring-rabbitmq-starter.adoc
@@ -46,4 +46,6 @@ The component supports 21 options, which are listed below.
 | *camel.component.spring-rabbitmq.shutdown-timeout* | The time to wait for workers in milliseconds after the container is stopped. If any workers are active when the shutdown signal comes they will be allowed to finish processing as long as they can finish within this timeout. The option is a long type. | 5000 | Long
 | *camel.component.spring-rabbitmq.test-connection-on-startup* | Specifies whether to test the connection on startup. This ensures that when Camel starts that all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted then Camel throws an exception on startup. This ensures that Camel is not started with failed connections. The JMS producers is tested as well. | false | Boolean
 |===
+
+
 // spring-boot-auto-configure options: END
diff --git a/components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/RabbitMQComponentAutoConfiguration.java b/components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQComponentAutoConfiguration.java
similarity index 87%
rename from components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/RabbitMQComponentAutoConfiguration.java
rename to components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQComponentAutoConfiguration.java
index 4592aa1..689d038 100644
--- a/components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/RabbitMQComponentAutoConfiguration.java
+++ b/components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQComponentAutoConfiguration.java
@@ -19,7 +19,7 @@ package org.apache.camel.component.springrabbit.springboot;
 import javax.annotation.Generated;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Component;
-import org.apache.camel.component.springrabbit.RabbitMQComponent;
+import org.apache.camel.component.springrabbit.SpringRabbitMQComponent;
 import org.apache.camel.spi.ComponentCustomizer;
 import org.apache.camel.spring.boot.CamelAutoConfiguration;
 import org.apache.camel.spring.boot.ComponentConfigurationProperties;
@@ -44,26 +44,26 @@ import org.springframework.context.annotation.Lazy;
 @Configuration(proxyBeanMethods = false)
 @AutoConfigureAfter(CamelAutoConfiguration.class)
 @Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class)
-@EnableConfigurationProperties({ComponentConfigurationProperties.class,RabbitMQComponentConfiguration.class})
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,SpringRabbitMQComponentConfiguration.class})
 @ConditionalOnHierarchicalProperties({"camel.component", "camel.component.spring-rabbitmq"})
-public class RabbitMQComponentAutoConfiguration {
+public class SpringRabbitMQComponentAutoConfiguration {
 
     @Autowired
     private ApplicationContext applicationContext;
     private final CamelContext camelContext;
     @Autowired
-    private RabbitMQComponentConfiguration configuration;
+    private SpringRabbitMQComponentConfiguration configuration;
 
-    public RabbitMQComponentAutoConfiguration(
+    public SpringRabbitMQComponentAutoConfiguration(
             org.apache.camel.CamelContext camelContext) {
         this.camelContext = camelContext;
         ApplicationConversionService acs = (ApplicationConversionService) ApplicationConversionService.getSharedInstance();
-        acs.addConverter(new RabbitMQComponentConverter(camelContext));
+        acs.addConverter(new SpringRabbitMQComponentConverter(camelContext));
     }
 
     @Lazy
     @Bean
-    public ComponentCustomizer configureRabbitMQComponent() {
+    public ComponentCustomizer configureSpringRabbitMQComponent() {
         return new ComponentCustomizer() {
             @Override
             public void configure(String name, Component target) {
@@ -75,7 +75,7 @@ public class RabbitMQComponentAutoConfiguration {
                         applicationContext,
                         "camel.component.customizer",
                         "camel.component.spring-rabbitmq.customizer")
-                    && target instanceof RabbitMQComponent;
+                    && target instanceof SpringRabbitMQComponent;
             }
         };
     }
diff --git a/components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/RabbitMQComponentConfiguration.java b/components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQComponentConfiguration.java
similarity index 99%
rename from components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/RabbitMQComponentConfiguration.java
rename to components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQComponentConfiguration.java
index 5cdc4e5..308b0cd 100644
--- a/components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/RabbitMQComponentConfiguration.java
+++ b/components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQComponentConfiguration.java
@@ -34,7 +34,7 @@ import org.springframework.util.ErrorHandler;
  */
 @Generated("org.apache.camel.springboot.maven.SpringBootAutoConfigurationMojo")
 @ConfigurationProperties(prefix = "camel.component.spring-rabbitmq")
-public class RabbitMQComponentConfiguration
+public class SpringRabbitMQComponentConfiguration
         extends
             ComponentConfigurationPropertiesCommon {
 
diff --git a/components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/RabbitMQComponentConverter.java b/components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQComponentConverter.java
similarity index 96%
rename from components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/RabbitMQComponentConverter.java
rename to components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQComponentConverter.java
index 9b2463e..26ec870 100644
--- a/components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/RabbitMQComponentConverter.java
+++ b/components-starter/camel-spring-rabbitmq-starter/src/main/java/org/apache/camel/component/springrabbit/springboot/SpringRabbitMQComponentConverter.java
@@ -27,13 +27,14 @@ import org.springframework.core.convert.converter.GenericConverter;
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
 @Generated("org.apache.camel.springboot.maven.SpringBootAutoConfigurationMojo")
-public class RabbitMQComponentConverter
+public class SpringRabbitMQComponentConverter
         implements
             org.springframework.core.convert.converter.GenericConverter {
 
     private final CamelContext camelContext;
 
-    public RabbitMQComponentConverter(org.apache.camel.CamelContext camelContext) {
+    public SpringRabbitMQComponentConverter(
+            org.apache.camel.CamelContext camelContext) {
         this.camelContext = camelContext;
     }
 
diff --git a/components-starter/camel-spring-rabbitmq-starter/src/main/resources/META-INF/spring.factories b/components-starter/camel-spring-rabbitmq-starter/src/main/resources/META-INF/spring.factories
index 549fcde..2aaba27 100644
--- a/components-starter/camel-spring-rabbitmq-starter/src/main/resources/META-INF/spring.factories
+++ b/components-starter/camel-spring-rabbitmq-starter/src/main/resources/META-INF/spring.factories
@@ -16,4 +16,4 @@
 ## ---------------------------------------------------------------------------
 
 org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.camel.component.springrabbit.springboot.RabbitMQComponentAutoConfiguration
+org.apache.camel.component.springrabbit.springboot.SpringRabbitMQComponentAutoConfiguration
diff --git a/docs/modules/ROOT/pages/spring-rabbitmq-starter.adoc b/docs/modules/ROOT/pages/spring-rabbitmq-starter.adoc
index 0f876aa..0bd8593 100644
--- a/docs/modules/ROOT/pages/spring-rabbitmq-starter.adoc
+++ b/docs/modules/ROOT/pages/spring-rabbitmq-starter.adoc
@@ -25,7 +25,7 @@ The component supports 21 options, which are listed below.
 |===
 | Name | Description | Default | Type
 | *camel.component.spring-rabbitmq.amqp-admin* | Optional AMQP Admin service to use for auto declaring elements (queues, exchanges, bindings). The option is a org.springframework.amqp.core.AmqpAdmin type. |  | AmqpAdmin
-| *camel.component.spring-rabbitmq.auto-declare* | Specifies whether the consumer should auto declare binding between exchange, queue and routing key when starting. | true | Boolean
+| *camel.component.spring-rabbitmq.auto-declare* | Specifies whether the consumer should auto declare binding between exchange, queue and routing key when starting. Enabling this can be good for development to make it easy to standup exchanges, queues and bindings on the broker. | false | Boolean
 | *camel.component.spring-rabbitmq.auto-startup* | Specifies whether the consumer container should auto-startup. | true | Boolean
 | *camel.component.spring-rabbitmq.autowired-enabled* | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean
 | *camel.component.spring-rabbitmq.bridge-error-handler* | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean
@@ -46,4 +46,6 @@ The component supports 21 options, which are listed below.
 | *camel.component.spring-rabbitmq.shutdown-timeout* | The time to wait for workers in milliseconds after the container is stopped. If any workers are active when the shutdown signal comes they will be allowed to finish processing as long as they can finish within this timeout. The option is a long type. | 5000 | Long
 | *camel.component.spring-rabbitmq.test-connection-on-startup* | Specifies whether to test the connection on startup. This ensures that when Camel starts that all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted then Camel throws an exception on startup. This ensures that Camel is not started with failed connections. The JMS producers is tested as well. | false | Boolean
 |===
+
+
 // spring-boot-auto-configure options: END