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 4bb1de6 Mark NatsEndpoint as supporting MultipleConsumers. 4bb1de6 is described below commit 4bb1de60dd842701a348e59f36621b1e72e4f163 Author: James Hilliard <james.hillia...@gmail.com> AuthorDate: Sat Feb 20 08:42:22 2021 -0700 Mark NatsEndpoint as supporting MultipleConsumers. Per nats documentation: NATS implements a publish-subscribe message distribution model for one-to-many communication. --- .../main/java/org/apache/camel/component/nats/NatsEndpoint.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/camel-nats/src/main/java/org/apache/camel/component/nats/NatsEndpoint.java b/components/camel-nats/src/main/java/org/apache/camel/component/nats/NatsEndpoint.java index 5130d5e..a7271aa 100644 --- a/components/camel-nats/src/main/java/org/apache/camel/component/nats/NatsEndpoint.java +++ b/components/camel-nats/src/main/java/org/apache/camel/component/nats/NatsEndpoint.java @@ -28,6 +28,7 @@ import io.nats.client.Options; import io.nats.client.Options.Builder; import org.apache.camel.Category; import org.apache.camel.Consumer; +import org.apache.camel.MultipleConsumersSupport; import org.apache.camel.Processor; import org.apache.camel.Producer; import org.apache.camel.spi.UriEndpoint; @@ -38,7 +39,7 @@ import org.apache.camel.support.DefaultEndpoint; * Send and receive messages from <a href="http://nats.io/">NATS</a> messaging system. */ @UriEndpoint(firstVersion = "2.17.0", scheme = "nats", title = "Nats", syntax = "nats:topic", category = { Category.MESSAGING }) -public class NatsEndpoint extends DefaultEndpoint { +public class NatsEndpoint extends DefaultEndpoint implements MultipleConsumersSupport { @UriParam private NatsConfiguration configuration; @@ -60,6 +61,11 @@ public class NatsEndpoint extends DefaultEndpoint { return consumer; } + @Override + public boolean isMultipleConsumersSupported() { + return true; + } + public ExecutorService createExecutor() { return getCamelContext().getExecutorServiceManager().newFixedThreadPool(this, "NatsTopic[" + configuration.getTopic() + "]", configuration.getPoolSize());