This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch exchange-factory in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/exchange-factory by this push: new 2605bdc CAMEL-16222: PooledExchangeFactory experiment 2605bdc is described below commit 2605bdca097971f3ecfa028d104268633fe3e0d9 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Feb 19 16:35:14 2021 +0100 CAMEL-16222: PooledExchangeFactory experiment --- core/camel-api/src/main/java/org/apache/camel/Consumer.java | 6 ++++++ core/camel-api/src/main/java/org/apache/camel/Endpoint.java | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/core/camel-api/src/main/java/org/apache/camel/Consumer.java b/core/camel-api/src/main/java/org/apache/camel/Consumer.java index 011208c..4d15bf0 100644 --- a/core/camel-api/src/main/java/org/apache/camel/Consumer.java +++ b/core/camel-api/src/main/java/org/apache/camel/Consumer.java @@ -34,6 +34,12 @@ public interface Consumer extends Service, EndpointAware { /** * Creates an {@link Exchange} that was consumed. + * <p/> + * <b>Important:</b> If the auto release parameter is set to <tt>false</tt> then + * the consumer is responsible for calling the {@link #releaseExchange(Exchange, boolean)} when the {@link Exchange} + * is done being routed. This is for advanced consumers that need to have this control in their own hands. + * For normal use-cases then a consumer can use autoRelease <tt>true</tt> and then Camel will automatic + * release the exchange after routing. * * @param autoRelease whether to auto release the exchange when routing is complete via {@link UnitOfWork} */ diff --git a/core/camel-api/src/main/java/org/apache/camel/Endpoint.java b/core/camel-api/src/main/java/org/apache/camel/Endpoint.java index cacdf51..ea85f3e 100644 --- a/core/camel-api/src/main/java/org/apache/camel/Endpoint.java +++ b/core/camel-api/src/main/java/org/apache/camel/Endpoint.java @@ -63,7 +63,10 @@ public interface Endpoint extends IsSingleton, Service { String getEndpointKey(); /** - * Create a new exchange for communicating with this endpoint + * Create a new exchange for communicating with this endpoint. + * <p/> + * <b>Important:</b> Consumers should use {@link Consumer#createExchange(boolean)} to create + * an exchange for which the consumer received a message. * * @return a new exchange */ @@ -72,6 +75,9 @@ public interface Endpoint extends IsSingleton, Service { /** * Create a new exchange for communicating with this endpoint with the specified {@link ExchangePattern} such as * whether its going to be an {@link ExchangePattern#InOnly} or {@link ExchangePattern#InOut} exchange + * <p/> + * <b>Important:</b> Consumers should use {@link Consumer#createExchange(boolean)} to create + * an exchange for which the consumer received a message. * * @param pattern the message exchange pattern for the exchange * @return a new exchange