Amazon MQ Specialized2017年〜
A fully managed message broker service supporting Apache ActiveMQ and RabbitMQ
What It Does
Amazon MQ is a fully managed message broker service that makes it easy to run Apache ActiveMQ and RabbitMQ in the cloud. You can migrate existing messaging applications to the cloud without rewriting code. It supports industry-standard protocols including JMS, AMQP, STOMP, MQTT, and OpenWire, making migration from on-premises message brokers straightforward. AWS automatically handles broker provisioning, patching, failure detection, and recovery.
Use Cases
Used for cloud migration of on-premises ActiveMQ or RabbitMQ, asynchronous messaging between legacy systems and cloud-native applications, loosely coupled communication between microservices, order processing system queuing, and receiving MQTT messages from IoT devices - anywhere standard protocol-based messaging is needed.
Everyday Analogy
Think of it like a post office. A sender (producer) drops off a letter (message) at the post office (broker), and it's delivered to the recipient (consumer) at their convenience. AWS handles all the building management and mail carrier staffing, so users can focus solely on the content of their letters.
What Is Amazon MQ?
Amazon MQ is a managed message broker supporting industry-standard messaging protocols. AWS also offers cloud-native messaging services like SQS and SNS, but these use proprietary APIs. If your existing on-premises applications depend on ActiveMQ or RabbitMQ APIs and protocols, Amazon MQ lets you migrate to the cloud without changing application code. For new development requiring cloud-native messaging, SQS or SNS is recommended.
Choosing Between ActiveMQ and RabbitMQ
Amazon MQ lets you choose either ActiveMQ or RabbitMQ as the broker engine. ActiveMQ has strong JMS (Java Message Service) compatibility and is well-suited for integration with Java-based enterprise applications. RabbitMQ is widely adopted as the reference implementation of the AMQP protocol, featuring flexible routing capabilities and high throughput. The basic approach is to match the engine used in your existing system, but for new deployments, compare based on your requirements. To gain a deeper understanding of choosing between ActiveMQ and RabbitMQ, related books (Amazon) are also worth checking out.
High Availability and Security
Amazon MQ supports multi-AZ configurations, automatically failing over to a standby broker if the primary broker fails. Data is persisted to EFS (ActiveMQ) or EBS (RabbitMQ) to prevent message loss. Communication is encrypted with TLS, and data at rest can be encrypted with AWS KMS. Placing the broker within a VPC also enables network-level access control.
Things to Watch Out For
- For new development requiring cloud-native messaging, prioritize SQS or SNS over Amazon MQ
- Multi-AZ configurations may experience tens of seconds of downtime during failover, so implementing client-side reconnection logic is important