Reputation: 103
anypoint mq subscriber and anypoint mq consumer. what is the basic difference between anypoint mq subscriber and anypoint mq consumer.I know both can consume message but what are key difference?
what is preftech concept , please do not share mulesoft docs link , i am already aware about this , i am looking your practical knowledge based on your hand on.
Upvotes: 0
Views: 1199
Reputation: 98
Subscriber is an Event source, which can be used to trigger a flow. It has inbuilt scheduler which you can configure for polling. (You are ready to consume message, but dont know when the message will come)
Consumer is an Event Processor, which cannot trigger a flow, therefore it can be used only after an event has generated. (You are sure a message is expected in the que)
prefetch is like assuming that the flow which the subscriber is triggering is capable of handling the messages. prefetch makes a copy in local buffer, which in turn signals that the message is already in use, so any other consumer or subscriber listening to the que will not get the message. The flow consumes the messages as per availability of threads.
Both works similarly but trade-offs can be only compared as per use case. So if you can give some perspective of your use case, we can compare. esp volume of messages, size of messages etc.
Upvotes: 1