You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/01/27 09:01:42 UTC

[camel] branch master updated (24f084f -> b8ff422)

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

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


    from 24f084f  Upgrade Junit Jupiter to version 5.6.0
     new 2886413  CAMEL-14441: Stomp connections are not established when the queues have additional features
     new b8ff422  CAMEL-14441 - Fixed CS

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:
 .../org/apache/camel/component/stomp/StompEndpoint.java | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)


[camel] 01/02: CAMEL-14441: Stomp connections are not established when the queues have additional features

Posted by ac...@apache.org.
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 2886413fe5bc7415846583627245e1f87881ce0c
Author: onlybytes <on...@gmail.com>
AuthorDate: Sun Jan 26 16:42:29 2020 +0530

    CAMEL-14441: Stomp connections are not established when the queues have additional features
---
 .../org/apache/camel/component/stomp/StompEndpoint.java | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
index fe0fe12..1f9a22a 100644
--- a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
+++ b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.stomp;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.Properties;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.stream.Collectors;
 
@@ -195,13 +196,23 @@ public class StompEndpoint extends DefaultEndpoint implements AsyncEndpoint, Hea
         }
     }
 
+    private void populateCustomHeadersToStompFrames(final StompFrame frame) {
+        Properties customHeaders = configuration.getCustomHeaders();
+        if(customHeaders!=null) {
+            for (Object key : customHeaders.keySet()) {
+                frame.addHeader(StompFrame.encodeHeader(key.toString()), StompFrame.encodeHeader(customHeaders.get(key).toString()));
+            }
+        }
+    }
+
     void addConsumer(final StompConsumer consumer) {
+        final StompFrame frame = new StompFrame(SUBSCRIBE);
+        populateCustomHeadersToStompFrames(frame);
+        frame.addHeader(DESTINATION, StompFrame.encodeHeader(destination));
+        frame.addHeader(ID, consumer.id);
         connection.getDispatchQueue().execute(new Task() {
             @Override
             public void run() {
-                StompFrame frame = new StompFrame(SUBSCRIBE);
-                frame.addHeader(DESTINATION, StompFrame.encodeHeader(destination));
-                frame.addHeader(ID, consumer.id);
                 connection.send(frame, null);
             }
         });


[camel] 02/02: CAMEL-14441 - Fixed CS

Posted by ac...@apache.org.
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 b8ff422a9748a4813cc278d540d3924004cad9af
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jan 27 10:01:16 2020 +0100

    CAMEL-14441 - Fixed CS
---
 .../src/main/java/org/apache/camel/component/stomp/StompEndpoint.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
index 1f9a22a..922933d 100644
--- a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
+++ b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
@@ -18,8 +18,8 @@ package org.apache.camel.component.stomp;
 
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.Properties;
+import java.util.Set;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.stream.Collectors;
 
@@ -198,7 +198,7 @@ public class StompEndpoint extends DefaultEndpoint implements AsyncEndpoint, Hea
 
     private void populateCustomHeadersToStompFrames(final StompFrame frame) {
         Properties customHeaders = configuration.getCustomHeaders();
-        if(customHeaders!=null) {
+        if (customHeaders != null) {
             for (Object key : customHeaders.keySet()) {
                 frame.addHeader(StompFrame.encodeHeader(key.toString()), StompFrame.encodeHeader(customHeaders.get(key).toString()));
             }