Skip to content

Mark NatsEndpoint as supporting MultipleConsumers.#5106

Merged
oscerd merged 1 commit into
apache:masterfrom
jameshilliard:nats-multi-consumer
Feb 20, 2021
Merged

Mark NatsEndpoint as supporting MultipleConsumers.#5106
oscerd merged 1 commit into
apache:masterfrom
jameshilliard:nats-multi-consumer

Conversation

@jameshilliard
Copy link
Copy Markdown
Contributor

Mark NatsEndpoint as supporting MultipleConsumers.

Per nats documentation:
NATS implements a publish-subscribe message distribution model for one-to-many communication.

Per nats documentation:
NATS implements a publish-subscribe message distribution model for one-to-many communication.
Copy link
Copy Markdown
Contributor

@oscerd oscerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that the component supports multiple camel consumers. This is not obvious and it doesn't depend from Nats, but from camel.

@jameshilliard
Copy link
Copy Markdown
Contributor Author

This is not obvious and it doesn't depend from Nats, but from camel.

Isn't it effectively a matter of whether or not it is safe to make multiple subscriptions from the same topic here:

dispatcher = dispatcher.subscribe(getEndpoint().getConfiguration().getTopic());

Or is there something else that needs to be changed?

@oscerd
Copy link
Copy Markdown
Contributor

oscerd commented Feb 20, 2021

Ah yeah, the NatsConsumer is using the executorService, so this is correct. My fault Sorry.

@oscerd oscerd merged commit 4bb1de6 into apache:master Feb 20, 2021
@jameshilliard jameshilliard deleted the nats-multi-consumer branch February 20, 2021 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants