Java – if we have active MQ, why do we need mule?
I worked as a software engineer on a project using ActiveMQ and mule for Java messaging service But I have a question: since ActiveMQ transmits all messages from one queue to another, why do you need mule?
Solution
The above picture is from the official mule 3 user manual
The following is a very simple overview to provide you with general concepts Without knowing the details of your application, it's hard to say how everything works together
The mule is not a message broker, but a service bus; It provides integration and communication services In its basic form, it can act like a message broker, but this is only a side effect of any integration layer
The real power of mule is the various integration points across different applications, systems and services; Provide safety, reporting, etc
ActiveMQ is just a message broker - the whole job is to effectively provide a messaging bus Mule accepts different requests, transforms / translates them, records them, and then publishes them to ActiveMQ as part of its definition process
It may also be that ActiveMQ acts as a queue for messages that need to be processed through mule later (as shown in the figure above)
Mule can use ActiveMQ as the message source and destination Using MQ in this way ensures that messages will be processed and no messages will be lost