Storage - Amazon MQ

Storage

Amazon MQ supports Amazon Elastic File System (EFS) and Amazon Elastic Block Store (EBS). By default, ActiveMQ brokers use Amazon EFS for broker storage. To take advantage of high durability and replication across multiple Availability Zones, use Amazon EFS. To take advantage of low latency and high throughput, use Amazon EBS.

Note

Amazon MQ only supports Amazon EBS for RabbitMQ broker storage.

Important
  • You can use Amazon EBS only with the mq.m5 broker instance type family.

  • Although you can change the broker instance type, you can't change the broker storage type after you create the broker.

  • Amazon EBS replicates data within a single Availability Zone and doesn't support the ActiveMQ active/standby deployment mode.

  • When working with Amazon EBS, we recommend creating mechanisms that would allow your application to recreate the message data (if necessary), rather than using Amazon EBS as the sole message storage location for your broker. For example, you can use JMS or XA transactions for ActiveMQ or store your messages at a location from which they can be replayed or regenerated.

Differences between Storage Types

The following table provides a brief overview of the differences between in-memory, Amazon EFS, and Amazon EBS storage types.

Storage Type Persistence Example Use Case Approximate Maximum Number of Messages Enqueued per Producer, per Second (1KB Message) Replication
In-memory Non-persistent
  • Stock quotes

  • Location data updates

  • Frequently changed data

5,000 None
Amazon EBS Persistent
  • High volumes of text

  • Order processing

500 Multiple copies within a single Availability Zone (AZ)
Amazon EFS Persistent Financial transactions 80 Multiple copies across multiple AZs

In-memory message storage provides the lowest latency and the highest throughput. However, messages are lost during instance replacement or broker restart.

Amazon EFS is designed to be highly durable, replicated across multiple AZs to prevent the loss of data resulting from the failure of any single component or an issue that affects the availability of an AZ. Amazon EBS is optimized for throughput and replicated across multiple servers within a single AZ.