whoami
whoami

Reputation: 1909

Anypoint MQ Connector - Difference between Consume and Subscriber

Anypoint MQ Connector has two modules, Consume and Subscribers that could be used to retrieve messages from the queue. I cannot find any good documentation about what is the difference between the two and uses cases where one should be preferred over the other?

Upvotes: 1

Views: 1501

Answers (1)

aled
aled

Reputation: 25872

Consume is an operation and Subscribe is a message source, both provided by the Anypoint MQ connector.

Subscribe polls the queue to find if there are new messages available, and then starts the flow with the message read. You can not use Subscribe inside a flow.

Consume is an operation that is used inside a flow. Because it is not a message source it can not start a flow, like Subscribe. Instead you use when the flow is started by some other source, like an HTTP request, then you want to read a message from a queue in some place of the flow execution.

Upvotes: 2

Related Questions