Amazon MQ is a fully managed message broker service for Apache ActiveMQ that makes it easy to set up and operate message brokers in the cloud.
Components of Amazon MQ
Broker is the core component of Amazon MQ and is basically a communication (of messages) intermediary between producers and consumers.
Message is the data sent (by producers) and received (by consumers).
Storage is where Amazon MQ keeps the messages received from producers, until they are processed by the consumers.. Amazon MQ supports primarily two types of storage:
- EFS to provide high durability and replication across multiple AZs. This is the default.
- Can enqueue up to 80 messages per second, per Producer
- EBS to provide low latency and high throughput.
- Can enqueue up to 500 messages per second, per Producer
- EBS is only available with select type of underlying broker instance types
- This option does replication within one AZ and thus reduces the durability of the message. The only way around is for you to implement mechanism to redundantly store messages.
- You can also deploy architecture to use In-memory to provide the highest throughput
- Can enqueue up to 800 messages per second, per Producer
- There is no replication done in this case, and thus the messages storage is non-persistent
- You can only specify storage type at the time of creating broker, and cannot change once broker is created.
Key Points
- Apache ActiveMQ is a popular open-source message broker, that supports:
- Queues architecture
- Topics architecture (Publish and Subscribe)
- ActiveMQ delivers messages in the order they were received.
- Amazon MQ is fully managed service, thus relieving you of effort for provisioning, setup, and maintenance of ActiveMQ.
- Amazon MQ is highly available, and provides strong message durability
- Messages are stored on EFS, across multiple AZs (within the same Region)
- Amazon MQ supports creating throughput-optimized message brokers backed by EBS
- Amazon MQ supports standard APIs and protocols for messaging, including JMS, NMS, AMQP, STOMP, MQTT, and WebSocket.
- In most cases you can leverage ActiveMQ in the cloud without any (or minimal) need to rewrite your messaging code.
- Security – messages are encrypted at rest, and in transit.
- Compliance – Amazon MQ is PIC, SOC, and ISO compliant, and HIPAA eligible.
- It makes sense to use Amazon MQ instead of Amazon SQS when you have existing applications based on Apache ActiveMQ architecture.
Pricing
Amazon MQ is billed for following components:
- Broker (basically compute charges) – per hour (based on underlying instance type)
- Storage – per GB per month
- Varies by type of storage (EFS, EBS)
- Data Transfer – standard AWS Data Transfer (out) charges apply
External Resources