Open-source alternative to Anypoint MQ

Anypoint MQ can be replaced with self-hosted Apache Kafka or other open-source brokers, but the mapping of queues, FIFO ordering and acknowledgments needs deliberate design. This page covers the options, coexistence with Mule, migration steps and cost drivers.

On this page

Open-source alternative to Anypoint MQ: the short answer

If your MuleSoft renewal or data residency review covers Anypoint MQ, the main self-hosted replacement for its standard queues, FIFO queues and message exchanges is Apache Kafka, released under Apache-2.0 with no paid edition from the Apache Software Foundation project itself. Anypoint MQ is a multi-tenant cloud message queuing service that MuleSoft hosts, supports payloads up to 10 MB, and is not available in the Anypoint Platform trial. It requires a paid subscription with the Anypoint MQ integration add-on, so the cost you are reviewing is a recurring subscription tied to a hosted service. Moving to Kafka changes who runs the broker, where the messages are stored and what you pay for, but it does not mean every queue workload needs a streaming platform. Before you commit, check the Anypoint MQ documentation for the exact feature set your flows rely on.

Running Mule itself does not change in this move. Your Mule applications keep running on the deployment model you already use, whether that is CloudHub, a hybrid setup on Mule servers or Runtime Fabric. What changes is the messaging layer: the Anypoint MQ connector configurations, the way consumers acknowledge messages, the handling of failed messages and any dead-letter logic. Your team should inventory every flow that publishes or consumes through Anypoint MQ and record its payload sizes, ordering needs and acknowledgment behavior. Costs move from a subscription to components you control, namely broker hardware or cloud instances, storage, monitoring, staff time and, if you want it, vendor support. Kafka 4.0 and later run only in KRaft mode and require Java 17 for brokers, so the Kafka downloads page should be checked against your platform standards before sizing the cluster.

The decision rests on what the workload needs, not on the product category. Kafka suits ordered, replayable event streams and fan-out to several consumer groups. A simple work queue with per-message acknowledgment and redelivery may be served by a lighter broker, and the team should test that option too. For a Kafka cluster, plan authentication with SSL or SASL, TLS between clients and brokers, and ACLs, because KRaft authorization denies resources without ACLs unless you explicitly allow otherwise. Ask your team to confirm payload sizes against Kafka's message limits, since the 10 MB Anypoint MQ ceiling does not carry over automatically. Run a pilot on one non-critical queue before planning the full cutover.

Which Anypoint MQ capabilities map to which open-source options

This table maps each Anypoint MQ capability to its closest self-hosted equivalent in Apache Kafka, with lighter alternatives where a streaming platform is more than the workload needs. Read the gaps column before scoping, because Kafka does not offer per-message acknowledgment and dead-letter behavior depends on how your consumers are written.

Anypoint MQ capabilityApache Kafka equivalentGaps and what to confirm
Standard queuesTopic with a consumer group; consumers read at their own offsets and commit progressKafka does not delete a message on read. Retention is set per topic, so confirm retention and compaction settings match your business need.
FIFO queuesOrdering guaranteed within a single partition, so route related messages with the same keyOrdering does not hold across partitions. Confirm the partition count and key design, and check producer idempotence settings for retries.
Message exchangesTopics with producers and consumer groups; routing logic lives in producers or in Kafka Connect and Kafka StreamsKafka has no built-in exchange with bindings. Teams usually move routing rules into application code or stream processing jobs.
Message acknowledgmentConsumer offset commits after processing; redelivery happens by resetting to an earlier offsetThere is no per-message acknowledgment. Your application must commit offsets only after successful processing and handle retries itself.
Payload size up to 10 MBBroker and producer message size limits, set through configurationAnypoint MQ documents the 10 MB limit. Confirm the Kafka broker, topic and client size settings, since large payloads are usually better stored in object storage with a reference in the message.
Dead-letter handlingNo native dead-letter queue; typically a separate retry or dead-letter topic written by the consumerConfirm how your Anypoint MQ dead-letter setup behaves today and design an equivalent retry topic with a documented replay procedure.
Multi-tenant isolationSeparate topics, consumer groups and ACLs per application, with SSL or SASL authenticationAnypoint MQ is hosted and multi-tenant. Self-hosted Kafka isolation depends on your cluster design, so decide whether tenants share a cluster.
Access controlACLs in the KRaft metadata log through the StandardAuthorizer; resources without ACLs are restricted to super users by defaultConfirm that allow.everyone.if.no.acl.found stays false in production so unlisted topics are not open to all clients.
Lighter alternativesRabbitMQ or a PostgreSQL-backed queue for simple task queues without replay or high throughput needsChoose these when you do not need long retention, replay or partitioned throughput. Confirm operational skills before adopting a second broker.

Which open-source broker fits which Anypoint MQ workload

Anypoint MQ mixes queue semantics with exchanges, so a replacement starts with the workload, not the product. The cards below separate replayable streams from lightweight work queues and name the operating costs that come with each choice. Use them to decide whether Apache Kafka is the right target or whether a lighter broker covers the workload.

Apache Kafka for replayable streams

Kafka is a distributed log, so messages stay on disk for a configured retention period and any consumer group can read them again from an earlier offset. This matches event sourcing, audit feeds and downstream analytics that must replay history. Check how retention settings and storage growth will be sized, and whether consumers can tolerate reprocessing duplicates. Kafka is licensed under Apache-2.0 with no paid edition from the project, so cost sits in infrastructure, staffing and any vendor support you buy.

Consumer groups instead of per-message acks

Anypoint MQ tracks acknowledgments per message on a queue. Kafka instead tracks a committed offset per partition for each consumer group, so one message can be processed by several independent groups. Mapping a single queue to a topic therefore changes failure handling: your code must commit offsets only after work succeeds and must handle redelivery. Confirm partition counts early, because they cap parallelism within a group.

Operating a streaming cluster

A production cluster needs capacity planning, monitoring, broker upgrades, certificate rotation and authorization rules. KRaft mode is required in the 4.x line, and the upgrade notes recommend moving older KRaft clusters to 3.9.x before going to 4.x. Budget engineering time for these recurring tasks, and ask any managed or vendor partner which of them they will run for you and which stay with your team.

Security configuration you must own

Kafka encryption and authentication are optional, so clusters can run with unsecured listeners unless you enforce TLS and SASL. Supported SASL mechanisms include SCRAM-SHA-512 and OAUTHBEARER, which fit most enterprise identity setups. In KRaft clusters, resources without ACLs are restricted to super users unless allow.everyone.if.no.acl.found is set to true, so review ACL design before connecting applications.

Lighter queues for task workloads

If the workload is point-to-point job dispatch, such as sending an email or running a report, with no need to replay history, a simpler queue is often the better answer. RabbitMQ and Redis-based queues cover these patterns with fewer moving parts. Choose a lighter option when messages are short-lived, throughput is modest, and the team lacks Kafka operating experience.

Peers in the databases and streaming pillar

The Databases and streaming pillar lists Apache Kafka and Apache Pulsar as the self-hosted streaming options, alongside Valkey and Redis Open Source for lightweight messaging. Compare them on retention model, multi-tenancy, client libraries and existing team skills. Confirm each candidate's current license and release cadence directly with its project before you commit.

How queues, FIFO ordering and acknowledgments map to Kafka topics and consumer groups

A Kafka topic is a log, not a queue, so the translation starts with a change of model. An Anypoint MQ queue removes a message once a consumer acknowledges it. A Kafka topic keeps every record for a retention period and each consumer group tracks its own position. To reproduce a queue, give each Mule consumer application its own consumer group, so that all instances of that application share the work and the group's committed offsets stand in for acknowledgment. Where a Mule flow currently publishes to a queue that several unrelated applications read, create one topic and one consumer group per application rather than sharing a group, because a shared group splits the records between its members and each application would miss messages meant for the others. FIFO ordering in Kafka holds only within a single partition, and a partition is chosen by the record key. Anypoint MQ FIFO queues order a whole queue, so a Mule publisher that needs order for one customer, account or order should set the Kafka record key to that business identifier and accept that ordering across different keys is no longer guaranteed. Confirm with the owners of each flow which identifier defines a sequence, and check whether the producer retries can reorder records (idempotent producer settings are the usual control to review). Partition count is fixed for a topic's lifetime in practice, so plan it before cutover.

Consumer offsets replace per-message acknowledgment, and the commit point decides what a retry looks like. In a Mule consumer, a message that is not acknowledged returns to the queue. In Kafka, the consumer commits an offset after processing, so committing before the work finishes loses records on a crash, and committing after means a restart reprocesses them. Most Mule flows therefore need idempotent handling keyed on a message ID, so that a redelivered record does not create a duplicate payment, order or ticket. For failures that repeat, route the record to a dead-letter topic with the original topic, partition, offset and error recorded in headers, and give operations a documented replay path. The Kafka upgrade and security documentation only covers the cluster, so the retry and dead-letter design is your responsibility to write and test.

What a self-hosted Kafka cluster needs for security and upgrades

Before any queue workload moves onto Apache Kafka, the platform team needs to settle security and version questions, because Kafka treats both as choices you make. Kafka authenticates clients, brokers and tools with SSL or SASL, and the documented SASL mechanisms are GSSAPI (Kerberos), PLAIN, SCRAM-SHA-256, SCRAM-SHA-512 and OAUTHBEARER. Security is optional in Kafka, so a cluster can run unsecured or mix secured and unsecured listeners. A misconfigured listener is the most common way an unsecured broker reaches production, so review every listeners and advertised.listeners entry and confirm that each one uses an encrypted, authenticated protocol. Check the Kafka security overview against your listener plan before the first deployment.

Version choices come first. Apache Kafka 4.0 and later run only in KRaft mode, and ZooKeeper mode has been removed, so any ZooKeeper-based cluster must migrate to KRaft before it upgrades to 4.x. The upgrade notes also recommend that KRaft clusters older than 3.3.x move to 3.9.x before going to 4.x. Brokers, Kafka Connect and tools need Java 17 from Kafka 4.0 onward, while clients and Kafka Streams applications need at least Java 11. Application teams often run older JVMs, so inventory client runtimes early. The downloads page lists 4.3.1, 4.2.2 and 4.1.2 as supported releases, and rolling upgrades are supported from the last three releases to the latest version. Confirm the current list on the day you plan, since it changes with each release.

Authorization needs a deliberate design too. In KRaft clusters the StandardAuthorizer stores ACLs in the cluster metadata log, and any resource without an ACL is restricted to super users unless allow.everyone.if.no.acl.found is set to true. Leave that setting at its default, then create explicit ACLs for each producer, consumer group and topic that queue replacements will use. Record the ACL model in your runbook so that a new service cannot silently fail or gain access. Ask your Kafka administrators to confirm which SASL mechanism and ACL approach match your identity provider, and budget time for certificate rotation and credential handling as recurring operational work.

How Kafka coexists with the rest of the MuleSoft suite

CloudHub 2.0 runs applications on infrastructure that MuleSoft operates, while hybrid deployments run on Mule servers that you manage. In both cases the Mule application opens outbound client connections to your Kafka brokers, so the design depends on a network path you can actually open. Whether a MuleSoft-managed runtime can reach a private cluster must be confirmed with MuleSoft before you commit to a broker placement.

  • Network path: Confirm whether CloudHub 2.0 egress can reach brokers on private addresses, or only public endpoints, and whether a fixed egress address can be allowlisted on your side.
  • Listeners: Expose brokers through listeners that use TLS and SASL. Kafka security is optional, so each listener must be configured explicitly, as described in the Kafka security overview.
  • Credentials: Keep SASL credentials out of application properties and use the secure configuration handling that your runtime supports.
  • Hybrid servers: Mule servers you run reach Kafka through your own firewall and routing, so your network team owns that path end to end.
  • Monitoring: Runtime Manager shows application status, but broker health and consumer lag must come from Kafka tooling.

Before design sign-off, test egress, DNS resolution and the TLS trust chain from a non-production runtime.

Moving Anypoint MQ queues and exchanges to Kafka in phases

This sequence moves Anypoint MQ workloads to a self-hosted Kafka cluster one queue at a time, so each consumer switches over with verified message delivery and a clear rollback path.

  1. Inventory queues, exchanges and consumers

    Export the list of Anypoint MQ queues, exchanges, bindings and consumer applications from the Anypoint Platform console or your own configuration records. For each queue, record message volume, peak rate, retention needs, whether it uses standard or FIFO delivery, the payload size distribution, and every producer and consumer that touches it. Flag any queue whose payloads approach the 10 MB Anypoint MQ limit. The step is done when every queue has one owner and a complete producer and consumer list, reviewed with the application teams. Ask MuleSoft to confirm which features your subscription and add-on include so nothing is missed.

  2. Classify each queue as stream or task queue

    Decide, per queue, whether it behaves as a stream (an ordered log that several consumer groups may read and replay) or a task queue (work items that one consumer should take and acknowledge once). Streams map naturally to Kafka topics with consumer groups. Task queues need more design: you choose partition keys to keep FIFO ordering where it matters, and you define how a failed message is retried or moved to a dead-letter topic. Write the decision and the ordering guarantee for each queue in a shared register. The step is complete when every queue has a documented classification that the owning team has signed off.

  3. Provision a cluster on a supported Kafka release

    Build a self-hosted Kafka cluster inside your own infrastructure on a release listed as supported on the Apache Kafka downloads page. Kafka 4.0 and later run only in KRaft mode, so a new cluster should not use ZooKeeper. Run brokers and Kafka Connect on Java 17, and confirm client libraries meet the Java 11 minimum. Enable TLS on all listeners and choose a SASL mechanism for clients, then set ACLs in the KRaft metadata log, since resources without ACLs are restricted to super users by default. Verify with a test topic, a producer, a consumer group and a failover test before any application connects. Confirm the hardware and storage sizing with the Kafka community documentation and your own load tests.

  4. Dual-publish during cutover

    For each queue in the migration wave, change the producer to publish to both Anypoint MQ and the matching Kafka topic, while consumers keep reading from Anypoint MQ. Add a correlation identifier to every message so both paths can be compared. Start new consumer groups on Kafka in a non-production or shadow mode and compare their output with the live consumers. Monitor publish errors on both sides and keep the dual-publish logic behind a configuration flag so it can be turned off quickly. The step is done when the Kafka copy of each message matches the Anypoint MQ copy for an agreed observation period set by the owning team.

  5. Switch consumers and drain Anypoint MQ

    Move each consumer group to read from Kafka, one application at a time, starting with consumers that are idempotent or that can tolerate replay. Keep Anypoint MQ publishing enabled until its queue backlog reaches zero, so messages already in flight are still processed. Check consumer lag, error rates and duplicate handling on the Kafka side. Where a consumer must process messages in strict order, confirm that the partition key preserves that order during the switch. The step is complete when the Anypoint MQ queue depth is zero and the Kafka consumer group shows steady lag with no unexplained duplicates or gaps.

  6. Verify delivery and retire Anypoint MQ queues

    Reconcile message counts, sampled payloads and dead-letter volumes between the period before cutover and the period after it. Confirm that acknowledgment behavior in your consumers matches the old semantics, because Kafka commits offsets rather than deleting messages on acknowledgment. Once the reconciliation report is accepted by the owners, stop publishing to Anypoint MQ, remove the queues and exchanges, and revoke the credentials that no longer have a use. Keep the configuration export and the reconciliation report as the record of the change. The step closes when no producer or consumer references an Anypoint MQ endpoint and the records are filed.

  7. Maintain the cluster on the Kafka upgrade path

    After cutover, your team owns patching and upgrades. Kafka publishes three releases a year, and bugfix releases appear only for supported releases. Rolling upgrades are supported from each release in the past year to the latest version, so plan regular minor upgrades rather than falling far behind. Clusters older than 3.3.x should move to 3.9.x before 4.x. Test each upgrade in a staging cluster, then roll brokers one at a time while watching under-replicated partitions. Assign an owner and a calendar for this work at handover. The step is done when the upgrade runbook and owner are recorded and a first staging upgrade has passed.

  8. Handle payloads near the 10 MB limit separately

    Messages near Anypoint MQ's 10 MB payload limit need their own pattern rather than being sent through the standard topic. Store the large object in object storage you control, then publish a small Kafka message that carries a reference, checksum and metadata. Consumers fetch the object before processing. Confirm the maximum message size configured on your brokers and clients, since Kafka defaults differ from Anypoint MQ and must be set deliberately. The step is complete when every queue with large payloads has a documented reference pattern and a tested consumer path.

What teams ask before replacing Anypoint MQ with Kafka

What drives the cost of replacing Anypoint MQ with self-hosted Kafka?

The main drivers are the infrastructure to run brokers, the staff who operate them, the work to change Mule flows that publish and consume through Anypoint MQ, and the testing that proves ordering and delivery behave as before. Anypoint MQ is a paid subscription with an add-on, so the cost you remove is recurring. Your Kafka cost is different in kind: servers or cloud instances, storage for retained messages, monitoring, and people who understand partitions, replication and consumer groups. Cluster size depends on message volume, retention and replication settings, which you should measure from your own traffic rather than assume. Ask any implementation partner to price cluster sizing, operations handover, connector rewrites and test cycles as separate line items.

How long does an Anypoint MQ to Kafka move take?

Duration depends on how many queues and exchanges you have, how many Mule applications depend on them, and how much ordering and acknowledgment behavior your consumers rely on. A small set of independent queues with simple consumers is far quicker to move than a set of FIFO queues that drive financial or inventory sequences. Plan the work in stages: inventory every queue, exchange and consumer, pick a pilot flow, build topics and consumer groups, run both systems in parallel, then cut over per flow. Your timeline should come from a written scope with named workstreams, not from a generic number. Use the Anypoint MQ documentation as the starting point for the inventory, since it defines the queue types and payload limits you must reproduce.

Can our own team run this migration without outside help?

A team with Java, Mule and messaging experience can do much of it internally, but Kafka adds a new operational discipline that most Mule teams have not owned before. The questions to answer honestly are whether you have someone who can size and tune brokers, whether you can patch and upgrade a cluster on a schedule, and whether you can own on-call for it. Many organizations split the work: internal staff own application changes and business rules, while an outside team handles cluster design, hardening, backup and runbooks. Either model should be agreed in a written scope before work begins. DeployOpen plans, implements, hardens, documents and supports self-hosted platforms inside your own infrastructure, and most engagements are fixed-scope.

What skills and records does a Kafka deployment need from our staff?

Your staff need broker and topic administration knowledge, a clear access control model, and written runbooks for routine and failure cases. Kafka supports SSL and SASL authentication, with mechanisms including SCRAM-SHA-512 and OAUTHBEARER, and in KRaft clusters the StandardAuthorizer keeps ACLs in the cluster metadata log. Resources without ACLs are restricted to super users unless allow.everyone.if.no.acl.found is set to true, so you must design ACLs per topic and consumer group before go-live. Document how to add a producer, rotate credentials, recover a broker and handle consumer lag. Confirm these requirements against the Kafka security and authorization documentation for the version you choose.

Is a lighter message queue enough instead of Kafka?

Often yes. Kafka is a distributed event log built for high throughput, long retention and replay, and that power carries operational weight. If your Anypoint MQ workload is mostly point-to-point task queues with modest volume, dead-letter handling and simple acknowledgments, a lighter broker such as RabbitMQ may match the need with less to run. Choose Kafka when you need replay of past events, many independent consumer groups reading the same stream, or throughput that a queue cannot sustain. Map your real patterns first: count how many consumers read each message, whether you need replay, and how strict FIFO ordering must be. Then compare brokers against those answers rather than against the product name.

What changes in Mule flows when Kafka replaces Anypoint MQ?

The main changes are the connector, the addressing model and the delivery semantics. Anypoint MQ queues and exchanges become Kafka topics, and consumers join consumer groups that track offsets rather than deleting messages on acknowledgment. FIFO ordering in Anypoint MQ must be reproduced with a partitioning key, because Kafka guarantees order only within a partition. Acknowledgment logic moves from the queue to offset commits, so duplicate handling must be designed into consumers. Payloads up to 10 MB in Anypoint MQ may also need a different approach in Kafka, which should be tested with your real message sizes. Test each flow for ordering, redelivery and failure behavior before cutover.

What should a quote for this work include?

A useful quote lists each component separately so you can compare it with your current spend. Ask for the following:

  • Architecture and cluster sizing, with the assumptions behind message volume and retention
  • Installation, hardening, authentication and ACL design, with the Kafka version and Java runtime stated
  • Mule connector and flow changes, listed per application
  • Testing for ordering, redelivery and failure cases, with the acceptance criteria written down
  • Backup, monitoring, runbooks and handover to your operations team
  • Ongoing support or upgrade retainers, priced separately from the one-time build

For a quote to be comparable, the scope, deliverables and timeline must be agreed in writing before work starts.

Which Kafka version should we plan around for a new cluster?

Plan around a currently supported release from the Kafka downloads page, and check the release dates there before you commit. Apache Kafka 4.0 and later run only in KRaft mode, so a ZooKeeper-based cluster must migrate to KRaft first. The upgrade notes recommend that KRaft clusters older than 3.3.x move to 3.9.x before moving to 4.x. Since Kafka 4.0, brokers, Kafka Connect and tools require Java 17, and clients and Kafka Streams applications need at least Java 11, so check your Mule and application runtimes against those requirements. Confirm the upgrade path with the Kafka upgrade notes for the version you select.

When a streaming platform is more than the workload needs

Running Apache Kafka to replace Anypoint MQ is justified only when the workload needs what a streaming log provides. A team with simple task queues, modest message volume, no need to replay old messages and no fan-out to several independent consumers may find that Kafka adds more operating work than the problem warrants. The deciding questions are ordering, retention and fan-out. Ask which messages must be processed strictly in sequence per key, how long messages must remain available after consumption, and how many independent systems must read the same event. If the answers are one consumer per message, short retention and strict order only within a small set of flows, a conventional queue or a lighter broker may be the better fit, and that choice should be made on evidence from your own traffic rather than on the general appeal of streaming.

Kafka is a log, so the operating model differs from a hosted queue. Your team would own broker capacity, topic and partition planning, consumer group lag, retention settings, upgrades and TLS and SASL configuration. The Kafka project's own documentation describes a supported release window, and the upgrade path from ZooKeeper-based clusters requires a KRaft migration first, so the skills needed include cluster operations, not only application coding. Anypoint MQ removes most of that burden from the customer, and the trade-off is that a self-hosted broker moves that work to your staff, your on-call rotation and your infrastructure budget. Those costs recur every year, while the one-time effort of building the first pipeline is usually the smaller share. Confirm your team's Kafka and Kubernetes or VM operations experience before committing.

Before choosing, measure the current Anypoint MQ workload: peak and average message rates, typical payload size against the 10 MB limit, queue depth during incidents, how often messages are redelivered and whether any consumer needs to rebuild state from history. Check whether the Anypoint MQ integration add-on serves other flows that would also need a replacement. Then compare two or three options side by side, including RabbitMQ or a database-backed queue for simple work distribution, and Kafka where ordering and replay matter. Ask an internal platform owner to estimate the staffing needed to run each option in your environment, and confirm that the chosen broker meets your encryption, authentication and audit requirements inside your own network before any migration starts.

How DeployOpen scopes and delivers a messaging replacement

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure, so a move from Anypoint MQ to self-hosted Apache Kafka is agreed in writing before any work starts. The steps below show what each stage covers for a queue-to-topic migration.

How we scope

  • Inventory every Anypoint MQ queue, exchange and consumer, with payload sizes and FIFO requirements noted.
  • Map each queue to a Kafka topic, partition strategy and consumer group, and record where ordering matters.
  • Agree deliverables, timelines and responsibilities in a fixed-scope written document before implementation begins.

How we build

  • Deploy Kafka in KRaft mode in your cloud account, data center or air-gapped network, with Java 17 for brokers.
  • Configure SSL/TLS listeners and one SASL mechanism, plus ACLs in the KRaft metadata log so no resource is open by default.
  • Test producer and consumer behavior, acknowledgment handling and redelivery against the current queue flows before cutover.

How we hand over

  • Provide runbooks for topic creation, retention, consumer group offsets, upgrades and broker recovery.
  • Document the mapping of each Anypoint MQ construct to its Kafka equivalent, including any behavior that differs.
  • Deliver configuration as code and walk your platform and security teams through operating the cluster.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover.
  • Plan version upgrades against the Kafka release schedule and your own change process.
  • Confirm with your team which support level, monitoring and on-call model fits your operating environment before signing.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.