[camel] branch master updated: CAMEL-12295: Added an option to Jms Endpoints so that they format JMS date properties according to the ISO 8601 standard
This is an automated email from the ASF dual-hosted git repository. aldettinger pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 319c217 CAMEL-12295: Added an option to Jms Endpoints so that they format JMS date properties according to the ISO 8601 standard 319c217 is described below commit 319c217731069d9aecde0c7b3fe904e0161cd5a2 Author: aldettingerAuthorDate: Thu Mar 1 21:19:19 2018 +0100 CAMEL-12295: Added an option to Jms Endpoints so that they format JMS date properties according to the ISO 8601 standard --- .../camel-amqp/src/main/docs/amqp-component.adoc | 6 ++- components/camel-jms/pom.xml | 5 ++ .../camel-jms/src/main/docs/jms-component.adoc | 6 ++- .../org/apache/camel/component/jms/JmsBinding.java | 8 ++- .../apache/camel/component/jms/JmsComponent.java | 16 ++ .../camel/component/jms/JmsConfiguration.java | 20 .../apache/camel/component/jms/JmsEndpoint.java| 10 .../apache/camel/component/jms/JmsBindingTest.java | 55 .../camel/component/jms/JmsComponentTest.java | 2 +- .../jms/JmsEndpointConfigurationTest.java | 4 ++ ...java => JmsFormatDateHeadersToIso8601Test.java} | 58 -- .../component/jms/JmsStreamMessageTypeTest.java| 1 + .../springboot/AMQPComponentConfiguration.java | 13 + .../jms/springboot/JmsComponentConfiguration.java | 27 ++ 14 files changed, 180 insertions(+), 51 deletions(-) diff --git a/components/camel-amqp/src/main/docs/amqp-component.adoc b/components/camel-amqp/src/main/docs/amqp-component.adoc index 230c7cc..ff345b2 100644 --- a/components/camel-amqp/src/main/docs/amqp-component.adoc +++ b/components/camel-amqp/src/main/docs/amqp-component.adoc @@ -39,7 +39,7 @@ link:../../../../camel-jms/src/main/docs/readme.html[JMS] component after the de // component options: START -The AMQP component supports 79 options which are listed below. +The AMQP component supports 80 options which are listed below. @@ -123,6 +123,7 @@ The AMQP component supports 79 options which are listed below. | *subscriptionShared* (consumer) | Set whether to make the subscription shared. The shared subscription name to be used can be specified through the subscriptionName property. Default is false. Set this to true to register a shared subscription, typically in combination with a subscriptionName value (unless your message listener class name is good enough as subscription name). Note that shared subscriptions may also be durable, so this flag can (and often will) be combined with subscrip [...] | *subscriptionName* (consumer) | Set the name of a subscription to create. To be applied in case of a topic (pub-sub domain) with a shared or durable subscription. The subscription name needs to be unique within this client's JMS client id. Default is the class name of the specified message listener. Note: Only 1 concurrent consumer (which is the default of this message listener container) is allowed for each subscription, except for a shared subscription (which requires JMS 2.0). | | String | *streamMessageType Enabled* (producer) | Sets whether StreamMessage type is enabled or not. Message payloads of streaming kind such as files, InputStream, etc will either by sent as BytesMessage or StreamMessage. This option controls which kind will be used. By default BytesMessage is used which enforces the entire message payload to be read into memory. By enabling this option the message payload is read into memory in chunks and each chunk is then written to the StreamMessage until n [...] +| *formatDateHeadersTo Iso8601* (producer) | Sets whether date headers should be formatted according to the ISO 8601 standard. | false | boolean | *headerFilterStrategy* (filter) | To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message. | | HeaderFilterStrategy | *resolveProperty Placeholders* (advanced) | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | boolean |=== @@ -154,7 +155,7 @@ with the following path and query parameters: |=== - Query Parameters (90 parameters): + Query Parameters (91 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -193,6 +194,7 @@ with the following path and query parameters: | *deliveryMode* (producer) | Specifies the delivery mode to be used. Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. | | Integer | *deliveryPersistent* (producer) | Specifies whether persistent delivery is used by default. | true | boolean | *explicitQosEnabled* (producer) | Set if the deliveryMode, priority or timeToLive
[camel] branch camel-2.20.x updated: fixed a checkstyle error
This is an automated email from the ASF dual-hosted git repository. cmueller pushed a commit to branch camel-2.20.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-2.20.x by this push: new 26dc647 fixed a checkstyle error 26dc647 is described below commit 26dc647a8f726dae78790d77e7c6a06e9e723773 Author: Christian MuellerAuthorDate: Sat Mar 3 18:15:07 2018 +0100 fixed a checkstyle error --- .../camel/component/aws/sns/SnsProducerTest.java | 24 ++ 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java index bba7698..38fffdc 100644 --- a/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java +++ b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java @@ -1,9 +1,21 @@ +/** + * 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.aws.sns; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; -import static org.mockito.Mockito.when; - import java.util.HashMap; import java.util.Map; @@ -19,6 +31,10 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; +import static org.mockito.Mockito.when; + @RunWith(MockitoJUnitRunner.class) public class SnsProducerTest { -- To stop receiving notification emails like this one, please contact cmuel...@apache.org.
[camel] branch master updated: fixed a checkstyle error
This is an automated email from the ASF dual-hosted git repository. cmueller pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 960a276 fixed a checkstyle error 960a276 is described below commit 960a2762dd4c624531251d9044e587f870fc82e2 Author: Christian MuellerAuthorDate: Sat Mar 3 18:12:42 2018 +0100 fixed a checkstyle error --- .../camel/component/aws/sns/SnsProducerTest.java | 24 ++ 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java index 56f1b91..394db6d 100644 --- a/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java +++ b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java @@ -1,9 +1,21 @@ +/** + * 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.aws.sns; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; -import static org.mockito.Mockito.when; - import java.util.HashMap; import java.util.Map; @@ -19,6 +31,10 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; +import static org.mockito.Mockito.when; + @RunWith(MockitoJUnitRunner.class) public class SnsProducerTest { -- To stop receiving notification emails like this one, please contact cmuel...@apache.org.
[camel] branch camel-2.19.x updated: CAMEL-12292: SnsProducer/SqsProducer setting MessageAttributes with empty values which causes errors
This is an automated email from the ASF dual-hosted git repository. cmueller pushed a commit to branch camel-2.19.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-2.19.x by this push: new ac04b60 CAMEL-12292: SnsProducer/SqsProducer setting MessageAttributes with empty values which causes errors ac04b60 is described below commit ac04b60541572f861ef68701779f880f003e2313 Author: Christian MuellerAuthorDate: Sat Mar 3 17:10:09 2018 +0100 CAMEL-12292: SnsProducer/SqsProducer setting MessageAttributes with empty values which causes errors --- .../camel/component/aws/sns/SnsProducer.java | 4 +- .../camel/component/aws/sqs/SqsProducer.java | 6 +- .../camel/component/aws/sns/SnsProducerTest.java | 67 ++ .../camel/component/aws/sqs/SqsProducerTest.java | 20 ++- 4 files changed, 91 insertions(+), 6 deletions(-) diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java index 36c4a15..d87add7 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java @@ -87,14 +87,14 @@ public class SnsProducer extends DefaultProducer { return structure; } -private Map translateAttributes(Map headers, Exchange exchange) { +Map translateAttributes(Map headers, Exchange exchange) { Map result = new HashMap (); HeaderFilterStrategy headerFilterStrategy = getEndpoint().getHeaderFilterStrategy(); for (Entry entry : headers.entrySet()) { // only put the message header which is not filtered into the message attribute if (!headerFilterStrategy.applyFilterToCamelHeaders(entry.getKey(), entry.getValue(), exchange)) { Object value = entry.getValue(); -if (value instanceof String) { +if (value instanceof String && !((String)value).isEmpty()) { MessageAttributeValue mav = new MessageAttributeValue(); mav.setDataType("String"); mav.withStringValue((String)value); diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsProducer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsProducer.java index 682d75e..6268ea8 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsProducer.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsProducer.java @@ -102,15 +102,15 @@ public class SqsProducer extends DefaultProducer { } return sqsProducerToString; } - -private Map translateAttributes(Map headers, Exchange exchange) { + +Map translateAttributes(Map headers, Exchange exchange) { Map result = new HashMap (); HeaderFilterStrategy headerFilterStrategy = getEndpoint().getHeaderFilterStrategy(); for (Entry entry : headers.entrySet()) { // only put the message header which is not filtered into the message attribute if (!headerFilterStrategy.applyFilterToCamelHeaders(entry.getKey(), entry.getValue(), exchange)) { Object value = entry.getValue(); -if (value instanceof String) { +if (value instanceof String && !((String)value).isEmpty()) { MessageAttributeValue mav = new MessageAttributeValue(); mav.setDataType("String"); mav.withStringValue((String)value); diff --git a/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java new file mode 100644 index 000..38fffdc --- /dev/null +++ b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java @@ -0,0 +1,67 @@ +/** + * 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 + * + *
[camel] branch master updated: CAMEL-12315 - correct auto-acknowledgment issues
This is an automated email from the ASF dual-hosted git repository. quinn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 9b19e60 CAMEL-12315 - correct auto-acknowledgment issues 9b19e60 is described below commit 9b19e60dbe42df472aefa45e10fbfd1f3436a43e Author: Quinn StevensonAuthorDate: Sat Mar 3 09:47:50 2018 -0700 CAMEL-12315 - correct auto-acknowledgment issues --- .../MllpAcknowledgementGenerationException.java} | 24 ++--- .../apache/camel/component/mllp/MllpConstants.java | 1 + .../component/mllp/MllpTcpServerConsumer.java | 46 +--- .../camel/component/mllp/internal/Hl7Util.java | 51 ++--- .../Hl7AcknowledgementGenerationException.java | 49 +++-- .../mllp/Hl7AcknowledgementGenerator.java | 6 +- ...oAcknowledgementWithBridgeErrorHandlerTest.java | 118 + ...knowledgementWithoutBridgeErrorHandlerTest.java | 113 ...lAcknowledgementWithBridgeErrorHandlerTest.java | 107 +++ ...knowledgementWithoutBridgeErrorHandlerTest.java | 107 +++ ...umerOptionalEndOfDataWithoutValidationTest.java | 2 - ...umerRequiredEndOfDataWithoutValidationTest.java | 4 - ...pServerConsumerAcknowledgementTestSupport.java} | 109 ++- .../camel/component/mllp/internal/Hl7UtilTest.java | 54 ++ 14 files changed, 657 insertions(+), 134 deletions(-) diff --git a/components/camel-mllp/src/main/java/org/apache/camel/processor/mllp/Hl7AcknowledgementGenerationException.java b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpAcknowledgementGenerationException.java similarity index 54% copy from components/camel-mllp/src/main/java/org/apache/camel/processor/mllp/Hl7AcknowledgementGenerationException.java copy to components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpAcknowledgementGenerationException.java index 09d7bbb..d857b42 100644 --- a/components/camel-mllp/src/main/java/org/apache/camel/processor/mllp/Hl7AcknowledgementGenerationException.java +++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpAcknowledgementGenerationException.java @@ -15,31 +15,23 @@ * limitations under the License. */ -package org.apache.camel.processor.mllp; +package org.apache.camel.component.mllp; /* - * Exception thrown by the HL7AcknowledgmentGenerator in the event of a failure. + * Exception thrown by MLLP Consumer if autoAck is set to true and an acknowledgement cannot be generated. */ -public class Hl7AcknowledgementGenerationException extends Exception { -private final byte[] hl7Message; +public class MllpAcknowledgementGenerationException extends MllpException { -public Hl7AcknowledgementGenerationException(String message) { +public MllpAcknowledgementGenerationException(String message) { super(message); -this.hl7Message = null; } -public Hl7AcknowledgementGenerationException(String message, byte[] hl7Message) { -super(message); -this.hl7Message = hl7Message; +public MllpAcknowledgementGenerationException(String message, byte[] hl7MessageBytes) { +super(message, hl7MessageBytes); } -public Hl7AcknowledgementGenerationException(String message, byte[] hl7Message, Throwable cause) { -super(message, cause); -this.hl7Message = hl7Message; +public MllpAcknowledgementGenerationException(String message, byte[] hl7MessageBytes, Throwable cause) { +super(message, hl7MessageBytes, cause); } - -public byte[] getHl7Message() { -return hl7Message; -} } diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpConstants.java b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpConstants.java index a2d9ae7..781a9ec 100644 --- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpConstants.java +++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpConstants.java @@ -27,6 +27,7 @@ public final class MllpConstants { public static final String MLLP_ACKNOWLEDGEMENT = "CamelMllpAcknowledgement"; public static final String MLLP_ACKNOWLEDGEMENT_STRING = "CamelMllpAcknowledgementString"; public static final String MLLP_ACKNOWLEDGEMENT_TYPE = "CamelMllpAcknowledgementType"; +public static final String MLLP_ACKNOWLEDGEMENT_MSA_TEXT = "CamelMllpAcknowledgementMsaText"; public static final String MLLP_ACKNOWLEDGEMENT_EXCEPTION = "CamelMllpAcknowledgementException"; public static final String MLLP_AUTO_ACKNOWLEDGE = "CamelMllpAutoAcknowledge"; diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
[camel] branch camel-2.20.x updated: CAMEL-12292: SnsProducer/SqsProducer setting MessageAttributes with empty values which causes errors
This is an automated email from the ASF dual-hosted git repository. cmueller pushed a commit to branch camel-2.20.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-2.20.x by this push: new 519e639 CAMEL-12292: SnsProducer/SqsProducer setting MessageAttributes with empty values which causes errors 519e639 is described below commit 519e63989512b35b4d7aac22c1c5b4e3fde01c8c Author: Christian MuellerAuthorDate: Sat Mar 3 17:10:09 2018 +0100 CAMEL-12292: SnsProducer/SqsProducer setting MessageAttributes with empty values which causes errors --- .../camel/component/aws/sns/SnsProducer.java | 4 +- .../camel/component/aws/sqs/SqsProducer.java | 6 +-- .../camel/component/aws/sns/SnsProducerTest.java | 51 ++ .../camel/component/aws/sqs/SqsProducerTest.java | 22 +- 4 files changed, 76 insertions(+), 7 deletions(-) diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java index 36c4a15..d87add7 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java @@ -87,14 +87,14 @@ public class SnsProducer extends DefaultProducer { return structure; } -private Map translateAttributes(Map headers, Exchange exchange) { +Map translateAttributes(Map headers, Exchange exchange) { Map result = new HashMap (); HeaderFilterStrategy headerFilterStrategy = getEndpoint().getHeaderFilterStrategy(); for (Entry entry : headers.entrySet()) { // only put the message header which is not filtered into the message attribute if (!headerFilterStrategy.applyFilterToCamelHeaders(entry.getKey(), entry.getValue(), exchange)) { Object value = entry.getValue(); -if (value instanceof String) { +if (value instanceof String && !((String)value).isEmpty()) { MessageAttributeValue mav = new MessageAttributeValue(); mav.setDataType("String"); mav.withStringValue((String)value); diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsProducer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsProducer.java index 682d75e..6268ea8 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsProducer.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsProducer.java @@ -102,15 +102,15 @@ public class SqsProducer extends DefaultProducer { } return sqsProducerToString; } - -private Map translateAttributes(Map headers, Exchange exchange) { + +Map translateAttributes(Map headers, Exchange exchange) { Map result = new HashMap (); HeaderFilterStrategy headerFilterStrategy = getEndpoint().getHeaderFilterStrategy(); for (Entry entry : headers.entrySet()) { // only put the message header which is not filtered into the message attribute if (!headerFilterStrategy.applyFilterToCamelHeaders(entry.getKey(), entry.getValue(), exchange)) { Object value = entry.getValue(); -if (value instanceof String) { +if (value instanceof String && !((String)value).isEmpty()) { MessageAttributeValue mav = new MessageAttributeValue(); mav.setDataType("String"); mav.withStringValue((String)value); diff --git a/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java new file mode 100644 index 000..bba7698 --- /dev/null +++ b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java @@ -0,0 +1,51 @@ +package org.apache.camel.component.aws.sns; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; +import static org.mockito.Mockito.when; + +import java.util.HashMap; +import java.util.Map; + +import com.amazonaws.services.dynamodbv2.model.GetRecordsRequest; +import com.amazonaws.services.sns.model.MessageAttributeValue; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import
[camel] branch master updated: CAMEL-12292: SnsProducer/SqsProducer setting MessageAttributes with empty values which causes errors
This is an automated email from the ASF dual-hosted git repository. cmueller pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new aff032b CAMEL-12292: SnsProducer/SqsProducer setting MessageAttributes with empty values which causes errors aff032b is described below commit aff032b7b415c73815d33cd44432ba52789127e3 Author: Christian MuellerAuthorDate: Sat Mar 3 17:10:09 2018 +0100 CAMEL-12292: SnsProducer/SqsProducer setting MessageAttributes with empty values which causes errors --- .../camel/component/aws/sns/SnsProducer.java | 4 +- .../camel/component/aws/sqs/SqsProducer.java | 4 +- .../camel/component/aws/sns/SnsProducerTest.java | 51 ++ .../camel/component/aws/sqs/SqsProducerTest.java | 19 +++- 4 files changed, 73 insertions(+), 5 deletions(-) diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java index 36c4a15..d87add7 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java @@ -87,14 +87,14 @@ public class SnsProducer extends DefaultProducer { return structure; } -private Map translateAttributes(Map headers, Exchange exchange) { +Map translateAttributes(Map headers, Exchange exchange) { Map result = new HashMap (); HeaderFilterStrategy headerFilterStrategy = getEndpoint().getHeaderFilterStrategy(); for (Entry entry : headers.entrySet()) { // only put the message header which is not filtered into the message attribute if (!headerFilterStrategy.applyFilterToCamelHeaders(entry.getKey(), entry.getValue(), exchange)) { Object value = entry.getValue(); -if (value instanceof String) { +if (value instanceof String && !((String)value).isEmpty()) { MessageAttributeValue mav = new MessageAttributeValue(); mav.setDataType("String"); mav.withStringValue((String)value); diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsProducer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsProducer.java index dfc2279..04a66e0 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsProducer.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsProducer.java @@ -118,14 +118,14 @@ public class SqsProducer extends DefaultProducer { return sqsProducerToString; } -private Map translateAttributes(Map headers, Exchange exchange) { +Map translateAttributes(Map headers, Exchange exchange) { Map result = new HashMap (); HeaderFilterStrategy headerFilterStrategy = getEndpoint().getHeaderFilterStrategy(); for (Entry entry : headers.entrySet()) { // only put the message header which is not filtered into the message attribute if (!headerFilterStrategy.applyFilterToCamelHeaders(entry.getKey(), entry.getValue(), exchange)) { Object value = entry.getValue(); -if (value instanceof String) { +if (value instanceof String && !((String)value).isEmpty()) { MessageAttributeValue mav = new MessageAttributeValue(); mav.setDataType("String"); mav.withStringValue((String)value); diff --git a/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java new file mode 100644 index 000..56f1b91 --- /dev/null +++ b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsProducerTest.java @@ -0,0 +1,51 @@ +package org.apache.camel.component.aws.sns; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; +import static org.mockito.Mockito.when; + +import java.util.HashMap; +import java.util.Map; + +import com.amazonaws.services.dynamodbv2.model.GetRecordsRequest; +import com.amazonaws.services.sns.model.MessageAttributeValue; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.component.aws.firehose.KinesisFirehoseEndpoint;
svn commit: r1026228 - in /websites/production/camel/content: cache/main.pageCache camel-2210-release.html
Author: buildbot Date: Sat Mar 3 14:18:41 2018 New Revision: 1026228 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2210-release.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2210-release.html == --- websites/production/camel/content/camel-2210-release.html (original) +++ websites/production/camel/content/camel-2210-release.html Sat Mar 3 14:18:41 2018 @@ -94,7 +94,7 @@ -New and NoteworthyWelcome to the x.y.z release which approx XXX issues resolved (new features, improvements and bug fixes such as...)This release supports only Spring Boot 1.5.x. Support for Spring Boot 2 is coming in Camel version 2.22 which is planned for early summer 2018.Upgraded to JAXB 2.3.0 which is more JDK9 compliant.Added better support forjavax.jms.StreamMessage types inJMS component.OptimisedJMS to support ActiveMQ Artemis http://activemq.apache.org/artemis/docs/latest/large-messages.html;>large messages so you can send and receive big messages such as GB's in size. There is an example demonstrating this in camel-example-artemis-large-messages.Added support for route coverage reports which allows 3rd party tooling via SPI to visualise route coverage to Camel developers.Added route-coverage goal to the https://github.com/apache/camel/blob/master/tooling/maven/camel-maven-plugin/src/main/docs/camel-maven-plugin.adoc; rel="nofollow">Camel Maven Plugin so you can report route coverage from Maven command line.Added support for doing manual commits via Java code when using Kafka consumer.Vendor extensions in the swagger generated API docs is now disabled turned off, when usingRest DSL(not all 3rd partyAPI gateways/tooling support vendor extensions). You can turn this back-on via the apiVendorExtension opti on.The SFTP consumer now also supports theuseList option which can be used to download a single known file without use LIST operation on the FTP server (which can be slow if the FTP server has many files in the LIST results)CamelJSON with camel-jackson will now automatic use shared ObjectMapper instance if there is only one instance in theRegistry. For example users with Spring Boot then allows Camel to easily use the default mapper from Spring Boot.AddedExtendedStartupListener that allows a callback just after the CamelContext has been fully started.You can now specify examples in theRest DSL that are included in the generated Swagger api-doc via camel-swagger-java.Improved file/ftp consumer to use current thread to poll, instead of a scheduled background task, when using pollEnrich (Content Enricher).Direct component now blocks by default if sending to a consumer which is not yet ready, which may happen during startup (little window of opportunity). This avoidsDirectConsumerNotAvailableException being thrown during startup etc.TheFTP component can now log progress (turn ontransferLoggingLevel) when perfomring download/upload and other operations. You can also find this information for the consumer in JMX.Added support for resuming downloads toFTP component. For example if you download big files and has connection problems with the FTP server. Then later when the connectivity works again, Camel can resume download the in-progress file.TheJettyandSERVLET consumers will now return HTTP Status 405 (method not allowed) for requests that would have been processed by another HTTP request method, for example calling REST services with the wrong method. Beforehand a 404 error code was always regardless.Reworked theFileIdempotentRepository so the internal in-memory cache is only used for quick lookup of the most frequent file names, and lookup from disk as well. See more details in the class javadoc of the file.TheSQL Stored Procedure component now supports INOUT parameters.Added restart action toControlBus Component so you can easier restart a route.camel-spring-boot actuator endpoints for routes is now in read-only mode by default.Added option toAggregate EIPs o make it easier to complete all previous groups on new incoming correlation key, and as well to force completion from Java code logic in theAggregationStrategy implementation.The following issues has been fixedFixedafterApplicationStart callback on camel-spring-boot to be called later and after CamelContext has been fully started.Fixed an issue testing with@UseAdviceWith and Camel on Spring Boot.FixedOnCompletion would not be triggered from a route usingSplitter and an exception was thrown during splitting.FixedKafka consumerstops consuming messages when exception occurs during offset commit.FixedNetty4 consumer to stop taking in new
[camel] branch master updated: CAMEL-12313: Added options to docs for camel:run maven goal
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 The following commit(s) were added to refs/heads/master by this push: new 8a64c16 CAMEL-12313: Added options to docs for camel:run maven goal 8a64c16 is described below commit 8a64c166427d84359e20f9f9980a96e558cf8f7e Author: Claus IbsenAuthorDate: Sat Mar 3 15:14:14 2018 +0100 CAMEL-12313: Added options to docs for camel:run maven goal --- .../src/main/docs/camel-maven-plugin.adoc | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tooling/maven/camel-maven-plugin/src/main/docs/camel-maven-plugin.adoc b/tooling/maven/camel-maven-plugin/src/main/docs/camel-maven-plugin.adoc index 70c6a5d..cd30b44 100644 --- a/tooling/maven/camel-maven-plugin/src/main/docs/camel-maven-plugin.adoc +++ b/tooling/maven/camel-maven-plugin/src/main/docs/camel-maven-plugin.adoc @@ -24,6 +24,19 @@ then boot up a Spring ApplicationContext using the XML configuration files on th If you want to boot up your Camel routes a little faster, you could try the `camel:embedded` instead. +=== Options + +The maven plugin *run* goal supports the following options which can be configured from the command line (use `-D` syntax), or defined in the `pom.xml` file in the `` tag. + +|=== +| Parameter | Default Value | Description +| duration | -1 | Sets the time duration (seconds) that the application will run for before terminating. A value <= 0 will run forever. +| durationIdle | -1 | Sets the idle time duration (seconds) duration that the application can be idle before terminating. A value <= 0 will run forever. +| durationMaxMessages | -1 | Sets the duration of maximum number of messages that the application will process before terminating. +| logClasspath | false | Whether to log the classpath when starting +|=== + + === Running OSGi Blueprint The `camel:run` plugin also supports running a Blueprint application, and by default it scans for OSGi blueprint files in @@ -250,7 +263,7 @@ And when running the validate goal again reports the following: === Options -The maven plugin supports the following options which can be configured from the command line (use `-D` syntax), or defined in the `pom.xml` file in the `` tag. +The maven plugin *validate* goal supports the following options which can be configured from the command line (use `-D` syntax), or defined in the `pom.xml` file in the `` tag. |=== | Parameter | Default Value | Description @@ -407,7 +420,7 @@ We can also see that this is one line 34 in the source code file, which is in th === Options -The maven plugin supports the following options which can be configured from the command line (use `-D` syntax), +The maven plugin *coverage* goal supports the following options which can be configured from the command line (use `-D` syntax), or defined in the `pom.xml` file in the `` tag. |=== -- To stop receiving notification emails like this one, please contact davscl...@apache.org.
[camel] branch master updated: CAMEL-12314: Dump routes as xml before/after when using advice with.
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 The following commit(s) were added to refs/heads/master by this push: new 7787e93 CAMEL-12314: Dump routes as xml before/after when using advice with. 7787e93 is described below commit 7787e93f17a26a2b9d75dc555f894623edba7137 Author: Claus IbsenAuthorDate: Sat Mar 3 14:56:11 2018 +0100 CAMEL-12314: Dump routes as xml before/after when using advice with. --- camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java | 5 + 1 file changed, 5 insertions(+) diff --git a/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java b/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java index a384934..ddb3fb9 100644 --- a/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java @@ -278,6 +278,8 @@ public class RouteDefinition extends ProcessorDefinition { throw new IllegalArgumentException("You can not advice with error handlers. Remove the error handlers from the route builder."); } +String beforeAsXml = ModelHelper.dumpModelAsXml(camelContext, this); + // stop and remove this existing route camelContext.removeRouteDefinition(this); @@ -298,6 +300,9 @@ public class RouteDefinition extends ProcessorDefinition { // log the merged route at info level to make it easier to end users to spot any mistakes they may have made log.info("AdviceWith route after: {}", merged); +String afterAsXml = ModelHelper.dumpModelAsXml(camelContext, merged); +log.info("Adviced route before/after as XML:\n{}\n{}", beforeAsXml, afterAsXml); + // If the camel context is started then we start the route if (camelContext instanceof StatefulService) { StatefulService service = (StatefulService) camelContext; -- To stop receiving notification emails like this one, please contact davscl...@apache.org.
[camel] branch master updated: Upgrade Chronicle Wire to version 1.11.1
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 The following commit(s) were added to refs/heads/master by this push: new c19e73a Upgrade Chronicle Wire to version 1.11.1 c19e73a is described below commit c19e73a19bbad1af8ce17df1d762b2317a8205c0 Author: Andrea CosentinoAuthorDate: Sat Mar 3 12:44:41 2018 +0100 Upgrade Chronicle Wire to version 1.11.1 --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index 75a0c99..4c145ea 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -127,7 +127,7 @@ 1.10.1 4.6.73 1.9.8 -1.11.0 +1.11.1 3.3.1 3.3.1_1 1.3.4 -- To stop receiving notification emails like this one, please contact acosent...@apache.org.
[camel] branch master updated: Upgrade Undertow to version 1.4.23.Final
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 The following commit(s) were added to refs/heads/master by this push: new c3ec8da Upgrade Undertow to version 1.4.23.Final c3ec8da is described below commit c3ec8da5b23c5f69cedc65333c274b4b6835b462 Author: Andrea CosentinoAuthorDate: Sat Mar 3 12:37:36 2018 +0100 Upgrade Undertow to version 1.4.23.Final --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index 5fb5efe..75a0c99 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -695,7 +695,7 @@ 4.0.6_1 4.0.6 1.3.0.Final -1.4.22.Final +1.4.23.Final 2.3.1 2015-01-27T15-02-14 1.0.0 -- To stop receiving notification emails like this one, please contact acosent...@apache.org.