You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/01/29 14:43:25 UTC

[camel] branch master updated (7a58c2b -> d45a22a)

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

davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 7a58c2b  CAMEL-16076: camel-core - Supervised route controller - better activity logging
     new 3d031b2  CAMEL-16106: camel-seda - Endpoints with custom queueSize to create queue lazy
     new d45a22a  Add deprecte since

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 components/camel-caffeine-lrucache/pom.xml                     |  1 +
 .../src/generated/resources/caffeine-lrucache.json             |  1 +
 .../java/org/apache/camel/component/seda/SedaEndpoint.java     |  2 +-
 .../java/org/apache/camel/component/seda/SedaProducer.java     |  2 --
 .../component/seda/{SedaInOnlyTest.java => SedaSizeTest.java}  | 10 +++++-----
 5 files changed, 8 insertions(+), 8 deletions(-)
 copy core/camel-core/src/test/java/org/apache/camel/component/seda/{SedaInOnlyTest.java => SedaSizeTest.java} (82%)


[camel] 02/02: Add deprecte since

Posted by da...@apache.org.
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.git

commit d45a22acb72df632a3a90cb339e31fcf2866babf
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jan 29 15:42:42 2021 +0100

    Add deprecte since
---
 components/camel-caffeine-lrucache/pom.xml                               | 1 +
 .../src/generated/resources/caffeine-lrucache.json                       | 1 +
 2 files changed, 2 insertions(+)

diff --git a/components/camel-caffeine-lrucache/pom.xml b/components/camel-caffeine-lrucache/pom.xml
index e6dd739..736a437 100644
--- a/components/camel-caffeine-lrucache/pom.xml
+++ b/components/camel-caffeine-lrucache/pom.xml
@@ -35,6 +35,7 @@
     <properties>
         <firstVersion>3.0</firstVersion>
         <label>core</label>
+        <deprecatedSince>3.8.0</deprecatedSince>
     </properties>
 
     <dependencies>
diff --git a/components/camel-caffeine-lrucache/src/generated/resources/caffeine-lrucache.json b/components/camel-caffeine-lrucache/src/generated/resources/caffeine-lrucache.json
index ae6863f..e0f89a7 100644
--- a/components/camel-caffeine-lrucache/src/generated/resources/caffeine-lrucache.json
+++ b/components/camel-caffeine-lrucache/src/generated/resources/caffeine-lrucache.json
@@ -5,6 +5,7 @@
     "title": "Caffeine Lrucache",
     "description": "Camel Caffeine LRUCache support",
     "deprecated": true,
+    "deprecatedSince": "3.8.0",
     "firstVersion": "3.0",
     "label": "core",
     "supportLevel": "Stable",


[camel] 01/02: CAMEL-16106: camel-seda - Endpoints with custom queueSize to create queue lazy

Posted by da...@apache.org.
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.git

commit 3d031b25ef08c525b4019ce8d650aca08111b36c
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jan 29 15:40:04 2021 +0100

    CAMEL-16106: camel-seda - Endpoints with custom queueSize to create queue lazy
---
 .../apache/camel/component/seda/SedaEndpoint.java  |  2 +-
 .../apache/camel/component/seda/SedaProducer.java  |  2 -
 .../apache/camel/component/seda/SedaSizeTest.java  | 45 ++++++++++++++++++++++
 3 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java b/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
index dacffa4..6af015b 100644
--- a/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
+++ b/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
@@ -534,7 +534,7 @@ public class SedaEndpoint extends DefaultEndpoint implements AsyncEndpoint, Brow
         // special for unit testing where we can set a system property to make seda poll faster
         // and therefore also react faster upon shutdown, which makes overall testing faster of the Camel project
         String override = System.getProperty("CamelSedaPollTimeout", "" + getPollTimeout());
-        setPollTimeout(Integer.valueOf(override));
+        setPollTimeout(Integer.parseInt(override));
     }
 
     @Override
diff --git a/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaProducer.java b/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaProducer.java
index fe7ab37..2293e79 100644
--- a/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaProducer.java
+++ b/components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaProducer.java
@@ -50,8 +50,6 @@ public class SedaProducer extends DefaultAsyncProducer {
         this.blockWhenFull = blockWhenFull;
         this.discardWhenFull = discardWhenFull;
         this.offerTimeout = offerTimeout;
-        // Force the creation of the queue
-        endpoint.getQueue();
     }
 
     @Override
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaSizeTest.java b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaSizeTest.java
new file mode 100644
index 0000000..0694d65
--- /dev/null
+++ b/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaSizeTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.seda;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.jupiter.api.Test;
+
+public class SedaSizeTest extends ContextTestSupport {
+
+    @Test
+    public void testSeda() throws Exception {
+        getMockEndpoint("mock:bar").expectedMessageCount(1);
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:start").to("seda:bar?size=5");
+
+                from("seda:bar?size=5").to("mock:bar");
+            }
+        };
+    }
+}