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 fe65e0b CAMEL-12249: JMS component. The option
eagerLoadingOfProperties should also force loading the jms message body to have
it initilized eager as well. For example when using transferExchange.
fe65e0b is described below
commit fe65e0bb3c8f68a54cac02fb341266f87c041c32
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Feb 13 10:25:48 2018 -0500
CAMEL-12249: JMS component. The option eagerLoadingOfProperties should also
force loading the jms message body to have it initilized eager as well. For
example when using transferExchange.
---
components/camel-amqp/src/main/docs/amqp-component.adoc | 4 ++--
components/camel-jms/src/main/docs/jms-component.adoc | 4 ++--
.../org/apache/camel/component/jms/EndpointMessageListener.java | 1 +
.../java/org/apache/camel/component/jms/JmsConfiguration.java | 4 ++--
.../camel/component/jms/springboot/JmsComponentConfiguration.java | 8 ++++----
5 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/components/camel-amqp/src/main/docs/amqp-component.adoc
b/components/camel-amqp/src/main/docs/amqp-component.adoc
index 6768b84..312703d 100644
--- a/components/camel-amqp/src/main/docs/amqp-component.adoc
+++ b/components/camel-amqp/src/main/docs/amqp-component.adoc
@@ -181,7 +181,7 @@ with the following path and query parameters:
| *allowReplyManagerQuickStop* (consumer) | Whether the
DefaultMessageListenerContainer used in the reply managers for request-reply
messaging allow the DefaultMessageListenerContainer.runningAllowed flag to
quick stop in case JmsConfigurationisAcceptMessagesWhileStopping is enabled and
org.apache.camel.CamelContext is currently being stopped. This quick stop
ability is enabled by default in the regular JMS consumers but to enable for
reply managers you must enable this flag. | false | boolean
| *consumerType* (consumer) | The consumer type to use which can be one of:
Simple Default or Custom. The consumer type determines which Spring JMS
listener to use. Default will use
org.springframework.jms.listener.DefaultMessageListenerContainer Simple will
use org.springframework.jms.listener.SimpleMessageListenerContainer. When
Custom is specified the MessageListenerContainerFactory defined by the
messageListenerContainerFactory option will determine what
org.springframework.jms.liste [...]
| *defaultTaskExecutorType* (consumer) | Specifies what default TaskExecutor
type to use in the DefaultMessageListenerContainer for both consumer endpoints
and the ReplyTo consumer of producer endpoints. Possible values: SimpleAsync
(uses Spring's SimpleAsyncTaskExecutor) or ThreadPool (uses Spring's
ThreadPoolTaskExecutor with optimal values - cached threadpool-like). If not
set it defaults to the previous behaviour which uses a cached thread pool for
consumer endpoints and SimpleAsync [...]
-| *eagerLoadingOfProperties* (consumer) | Enables eager loading of JMS
properties as soon as a message is loaded which generally is inefficient as the
JMS properties may not be required but sometimes can catch early any issues
with the underlying JMS provider and the use of JMS properties | false | boolean
+| *eagerLoadingOfProperties* (consumer) | Enables eager loading of JMS
properties and payload as soon as a message is loaded which generally is
inefficient as the JMS properties may not be required but sometimes can catch
early any issues with the underlying JMS provider and the use of JMS properties
| false | boolean
| *exceptionHandler* (consumer) | To let the consumer use a custom
ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this
options is not in use. By default the consumer will deal with exceptions that
will be logged at WARN or ERROR level and ignored. | | ExceptionHandler
| *exchangePattern* (consumer) | Sets the exchange pattern when the consumer
creates an exchange. | | ExchangePattern
| *exposeListenerSession* (consumer) | Specifies whether the listener session
should be exposed when consuming messages. | false | boolean
@@ -381,4 +381,4 @@ prefix, so you don't have to configure it explicitly.
* Configuring Camel
* Component
* Endpoint
-* Getting Started
\ No newline at end of file
+* Getting Started
diff --git a/components/camel-jms/src/main/docs/jms-component.adoc
b/components/camel-jms/src/main/docs/jms-component.adoc
index 579cd92..21fd8d3 100644
--- a/components/camel-jms/src/main/docs/jms-component.adoc
+++ b/components/camel-jms/src/main/docs/jms-component.adoc
@@ -353,7 +353,7 @@ with the following path and query parameters:
| *allowReplyManagerQuickStop* (consumer) | Whether the
DefaultMessageListenerContainer used in the reply managers for request-reply
messaging allow the link DefaultMessageListenerContainerrunningAllowed() flag
to quick stop in case link JmsConfigurationisAcceptMessagesWhileStopping() is
enabled and org.apache.camel.CamelContext is currently being stopped. This
quick stop ability is enabled by default in the regular JMS consumers but to
enable for reply managers you must enable this flag [...]
| *consumerType* (consumer) | The consumer type to use which can be one of:
Simple Default or Custom. The consumer type determines which Spring JMS
listener to use. Default will use
org.springframework.jms.listener.DefaultMessageListenerContainer Simple will
use org.springframework.jms.listener.SimpleMessageListenerContainer. When
Custom is specified the MessageListenerContainerFactory defined by the
messageListenerContainerFactory option will determine what
org.springframework.jms.liste [...]
| *defaultTaskExecutorType* (consumer) | Specifies what default TaskExecutor
type to use in the DefaultMessageListenerContainer for both consumer endpoints
and the ReplyTo consumer of producer endpoints. Possible values: SimpleAsync
(uses Spring's SimpleAsyncTaskExecutor) or ThreadPool (uses Spring's
ThreadPoolTaskExecutor with optimal values - cached threadpool-like). If not
set it defaults to the previous behaviour which uses a cached thread pool for
consumer endpoints and SimpleAsync [...]
-| *eagerLoadingOfProperties* (consumer) | Enables eager loading of JMS
properties as soon as a message is loaded which generally is inefficient as the
JMS properties may not be required but sometimes can catch early any issues
with the underlying JMS provider and the use of JMS properties | false | boolean
+| *eagerLoadingOfProperties* (consumer) | Enables eager loading of JMS
properties and payload as soon as a message is loaded which generally is
inefficient as the JMS properties may not be required but sometimes can catch
early any issues with the underlying JMS provider and the use of JMS properties
| false | boolean
| *exceptionHandler* (consumer) | To let the consumer use a custom
ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this
options is not in use. By default the consumer will deal with exceptions that
will be logged at WARN or ERROR level and ignored. | | ExceptionHandler
| *exchangePattern* (consumer) | Sets the exchange pattern when the consumer
creates an exchange. | | ExchangePattern
| *exposeListenerSession* (consumer) | Specifies whether the listener session
should be exposed when consuming messages. | false | boolean
@@ -1379,4 +1379,4 @@ wmq.setDestinationResolver(new DestinationResolver() {
* Bean Integration
* Tutorial-JmsRemoting
* http://activemq.apache.org/jmstemplate-gotchas.html[JMSTemplate
-gotchas]
\ No newline at end of file
+gotchas]
diff --git
a/components/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java
index f3d48f4..e8c0dae 100644
---
a/components/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java
+++
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java
@@ -86,6 +86,7 @@ public class EndpointMessageListener implements
SessionAwareMessageListener {
final Exchange exchange = createExchange(message, session,
replyDestination);
if (eagerLoadingOfProperties) {
+ exchange.getIn().getBody();
exchange.getIn().getHeaders();
}
String correlationId = message.getJMSCorrelationID();
diff --git
a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
index eb054ce..f67a7b8 100644
---
a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
+++
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
@@ -280,7 +280,7 @@ public class JmsConfiguration implements Cloneable {
+ " message brokers and you want to route message from one system
to another.")
private boolean disableReplyTo;
@UriParam(label = "consumer,advanced",
- description = "Enables eager loading of JMS properties as soon as
a message is loaded"
+ description = "Enables eager loading of JMS properties and payload
as soon as a message is loaded"
+ " which generally is inefficient as the JMS properties
may not be required"
+ " but sometimes can catch early any issues with the
underlying JMS provider"
+ " and the use of JMS properties")
@@ -1387,7 +1387,7 @@ public class JmsConfiguration implements Cloneable {
}
/**
- * Enables eager loading of JMS properties as soon as a message is loaded
+ * Enables eager loading of JMS properties and payload as soon as a
message is loaded
* which generally is inefficient as the JMS properties may not be required
* but sometimes can catch early any issues with the underlying JMS
provider
* and the use of JMS properties
diff --git
a/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java
b/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java
index 4e76189..50c3f48 100644
---
a/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java
+++
b/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java
@@ -1564,10 +1564,10 @@ public class JmsComponentConfiguration
*/
private Boolean lazyCreateTransactionManager = true;
/**
- * Enables eager loading of JMS properties as soon as a message is
- * loaded which generally is inefficient as the JMS properties may not
- * be required but sometimes can catch early any issues with the
- * underlying JMS provider and the use of JMS properties
+ * Enables eager loading of JMS properties and payload as soon as a
+ * message is loaded which generally is inefficient as the JMS
+ * properties may not be required but sometimes can catch early any
+ * issues with the underlying JMS provider and the use of JMS
properties
*/
private Boolean eagerLoadingOfProperties = false;
/**
--
To stop receiving notification emails like this one, please contact
[email protected].