Apache Fineract external events with Kafka or ActiveMQ

Apache Fineract can publish business events such as ClientCreated to ActiveMQ, other JMS brokers or Apache Kafka, but the feature is off by default. This page covers the decisions, build sequence, effort and consumer design needed before payment, CRM, notification or reporting systems react to account changes.

On this page

Why Apache Fineract external events need a broker and careful consumers

Fineract can publish external business events, such as ClientCreated, to ActiveMQ or another JMS broker and to Apache Kafka, but this is disabled by default, so the switch is the easy part. The harder work is designing consumers that process events correctly and operating the broker and its consumers over time. A bank that turns on publishing and points its payment, notification, CRM and reporting systems at a topic has not yet built an event-driven integration. It has only made events available to be consumed.

Delivery and correct processing are different things. A broker typically guarantees that a message is delivered at least once, so consumers must expect duplicates, and they must expect messages for the same client or account to arrive out of order or after a retry. A notification sent twice or a CRM record updated from a stale event can cause customer-facing errors that are hard to unwind. Each consumer needs idempotent handling keyed on a stable identifier from the event, a rule for what happens when an older event arrives after a newer one, and a dead-letter path for messages it cannot process. Confirm with your broker vendor exactly what its delivery and redelivery semantics are for the configuration you choose.

Multi-tenant identifiers must travel with every event. Fineract is multi-tenant and API requests carry a Fineract-Platform-TenantId header, so consumers serving several institutions or brands need the tenant on each message to route, filter and apply the right data. Check that the payload and message headers include tenant context before any consumer relies on it, and test a cross-tenant case in staging.

The event catalog must also be confirmed against the Fineract version you run. The Fineract releases follow a quarterly cadence, so event names, fields and payloads can change between releases. Treat the list of events and their schemas as a controlled interface: read the platform documentation and the repository for your exact release, record the payloads you depend on, and add contract tests so an upgrade that changes an event fails in testing rather than in production. Ask your implementation partner to include this in the integration scope and in upgrade regression testing.

Which Fineract and broker components an event integration touches

An event integration touches six components that each own a different part of the flow, from the event publisher inside Fineract to the consumers that act on it. Each one has a configuration or ownership question that must be settled before any consumer goes live, because a fault in one component can look like a fault in another.

Fineract event publisher

The publisher is the Fineract component that emits business events such as ClientCreated. It is disabled by default, so the integration team must enable it through configuration and record exactly which event types are switched on. Confirm which instance type emits events in the release in use, since write, batch and read instances behave differently and an event emitted from the wrong instance can be missed or duplicated. Check this against the Fineract documentation for your version.

Default state
Disabled
Fineract docs

ActiveMQ or other JMS broker

A JMS broker such as ActiveMQ receives events when Fineract is configured to publish to it. The team owns broker sizing, queue or topic naming, persistence settings and dead-letter handling. Confirm which broker product and version your Fineract release supports, and whether the publisher expects queues or topics, because consumers subscribe differently. Message loss or redelivery rules are set here, not in Fineract.

Apache Kafka cluster

Kafka is the alternative event transport, offering a retained, replayable log that reporting and downstream systems can read at their own pace. The team owns topic design, partition count, replication factor, retention and access control lists. Confirm the topic naming scheme with the consumers early, because renaming topics after go-live forces every consumer to change. Ask the Fineract release notes whether Kafka publishing is supported in the version you run.

Consumer services

Payment, notification, CRM and reporting systems each subscribe to events and act on them. Each consumer owns its own idempotency, ordering assumptions and error handling, and none of them should assume events arrive exactly once or in account order. Confirm for each consumer which event types it needs, whether it can replay history, and what it does with a duplicate ClientCreated or a late loan event. Test each one against redelivery before connecting it to live accounts.

Tenants database and tenant header

Fineract is multi-tenant, and API requests carry a Fineract-Platform-TenantId header that identifies the institution. The tenants database maps each identifier to its connection settings. The integration must carry the tenant identifier into every event so that consumers can route or filter by institution. Confirm that the tenant identifier appears in the event payload or topic routing for your release, because a missing tenant field is hard to recover from in a shared consumer.

PostgreSQL source of truth

PostgreSQL holds the authoritative account, loan and ledger records, and events are a notification of changes that already happened there. Fineract's README recommends PostgreSQL and deprecates MariaDB and MySQL under FSIP-9. Consumers must not treat an event as the record of a balance, and reconciliation should compare consumer totals against the database. Confirm which database engine and version your deployment uses before designing consumer storage around it.

FSIP-9 proposal

ActiveMQ, JMS or Kafka: which broker and event pattern to choose

This table compares four ways to carry Fineract business events to downstream systems, from reusing a bank's existing broker to polling the REST API. Read each row for when the option fits, what it costs to run, and what your own team must confirm before committing. The main takeaway: the broker decision follows from what your organization already operates and how much replay and ordering your consumers need.

OptionWhen it fitsOperational cost and what to verify
Existing ActiveMQ or other JMS broker run by the bankThe bank already operates a supported JMS broker with messaging staff and monitoring, and consumers already speak JMS.Costs fall mainly on skills and support contracts you already have. Verify that Fineract's ActiveMQ or JMS publisher is supported on your broker version, how dead-letter queues are configured, and how long messages are retained.
New Apache Kafka clusterNo broker exists yet, several consumers need to replay history, or streaming and analytics teams already use Kafka.Requires new skills in topic design, partitioning, consumer groups and cluster operations, plus hosting in your own infrastructure. Verify retention settings, replication factor, and who owns patching and capacity planning.
Shared broker across several tenantsOne Fineract platform serves several institutions or brands and one broker can serve them all.Lower infrastructure count but a noisy-neighbor and access-control question. Verify that topic or queue names carry the tenant identifier, that each tenant's consumers only read their own events, and that quotas are set per tenant.
Per-tenant topics or queuesTenants need separate retention, access rights or downstream ownership, or their data must stay logically isolated.More topics and configuration to manage and monitor, and more to change on onboarding. Verify naming conventions, ACLs per tenant, and that the publisher configuration maps each tenant to the correct destination.
Direct REST polling of FineractA consumer cannot run a broker client, such as a small reporting tool or a legacy system with only HTTP access.No broker to run, but polling adds load on Fineract APIs, can miss changes between polls, and has no built-in ordering or redelivery. Verify that the endpoints you poll return the data needed, how you store a checkpoint, and that polling runs against a read instance.
Ordering and replay needsPayment or ledger consumers depend on the order of account changes, or a new consumer must rebuild state from history.Ordering guarantees differ between JMS queues, JMS topics and Kafka partitions. Verify which key you partition or group by, whether duplicate delivery is possible, and how consumers handle redelivery.
Monitoring and alertingEvery option needs visibility into lag, failed deliveries and broker health.Someone must own dashboards for broker health, consumer lag and dead-letter volume. Verify that alerts reach the team that can act on a stalled payment or notification flow.
Licensing and hosting of the brokerThe broker itself has a cost even though Fineract is Apache-2.0 licensed.Broker licensing, support, hosting and backup are separate from Fineract. Verify the license terms and support model of the broker you choose, and include its hosting in the cost comparison.

How to build the Fineract event pipeline in order

This sequence takes a Fineract deployment from an unconfigured event feed to consumers that react to account changes safely, with each step closed by a check you can run. The order matters because consumer design depends on the payload contract, and broker security depends on the topic layout.

  1. Confirm the event catalog and payload fields

    Before enabling anything, the integration team pulls the list of external business events and their payload fields from the documentation for the Fineract release in use, currently planned around the 1.x line in production. Record each event name, such as ClientCreated, and the fields it carries, including the tenant identifier and an event identity that consumers can rely on. Confirm with the vendor or your own test environment whether any field is missing for your downstream systems. Done when the catalog is signed off by the owners of each consumer and stored under version control alongside the release number.

  2. Enable external event publishing and confirm broker settings

    External event publishing is disabled by default, so the platform engineer turns it on through the environment variables documented for the release in use and points it at either an ActiveMQ or other JMS broker, or Apache Kafka. Exact configuration keys must be taken from the documentation for that release, not from memory or older examples. Confirm the broker address, the destination type and the serialization settings in a non-production environment. Done when the platform starts cleanly with publishing enabled and the broker reports a connected producer.

  3. Provision broker accounts, TLS and topic naming

    The security team provisions a dedicated account for Fineract to publish and separate accounts for each consumer, each with only the permissions it needs. Encrypt connections with TLS and store credentials in the secrets manager rather than in configuration files. Agree a naming scheme for topics or queues that separates tenants and environments, so a test feed cannot reach production consumers. Confirm the exact authentication and TLS options with your broker's documentation. Done when a consumer account can read only its own destination and the publisher account can write only to Fineract's destinations.

  4. Run a single test event through the write path

    Create one test client on a non-production tenant through the write instance, then confirm the event appears on the expected destination. Check that the message carries the tenant identifier, the event name and the event identity, and that the body matches the catalog from the first step. Run the same test against the batch and read instances to confirm they do not publish duplicates, since only the write path should generate business events. Done when a single test event is visible once, with the correct tenant identifier, on the right destination.

  5. Define the consumer contract and versioning rules

    Write a contract for each consumer that names the event version it accepts, the fields it requires and the behavior for unknown fields. The usual rule is to ignore unknown fields and fail only on missing required fields, so that a new field in a later release does not stop the consumer. Set a rule for what happens to an event version the consumer does not recognize, such as routing it to the dead-letter destination for review. Done when each consumer owner has signed the contract and a test message with an extra field is processed without error.

  6. Build idempotent consumers with a processed-event record

    Brokers can redeliver messages, so each consumer stores a record of every event identity it has processed and skips any event it has already handled. Commit the business effect and the processed record in one transaction where the consumer's own database allows it, so a crash cannot leave the two out of step. Test redelivery by replaying the same test event twice and confirming that the downstream system changes only once. Done when a replayed event produces no second payment, notification or CRM update.

  7. Configure retries, dead letters and flow alerts

    Set a bounded retry policy for transient failures, then route messages that still fail to a dead-letter destination with the original payload and error reason attached. Create an alert that fires when a consumer's lag grows or when no messages arrive for a period agreed with the operations team, since silent stoppage is the most common failure. Assign an owner to review the dead-letter destination each working day. Done when a deliberately broken test message lands in the dead-letter destination and the alert fires in the on-call channel.

How a Fineract business event reaches downstream systems

The flow starts with a client or staff API request that reaches the Fineract write instance, where the change is committed to PostgreSQL. The event publisher, when enabled, sends the business event to an ActiveMQ or JMS broker, or to a Kafka topic, and each downstream consumer reads it into its own processed-event store. Failed messages move to a dead-letter path. Check the commit-before-publish order, the trust boundary between zones, and whether every consumer can handle a duplicate.

Event path from API write to downstream consumers, with dead-letter side path.

What drives the effort and cost of Fineract event integration

This table lists the factors that change how much work an event integration takes, how each one raises effort, and how to keep it contained. Read it before asking a partner or internal team for a quote, because the event catalogue, consumer logic and tenant model usually decide the total more than the broker choice does.

DriverWhy it changes effort or costHow to keep it down
Number of event types and consumersEach event type needs a schema, a contract, a test set and an owner. Each consumer adds its own deserialization, error handling, monitoring and release coordination.Agree a small event subset for the first release, and build one consumer per business outcome rather than one consumer per system.
Number of tenants and topic sharingFineract is multi-tenant and tenant identity travels in the Fineract-Platform-TenantId header. Separate topics per tenant multiply configuration and monitoring, while shared topics need tenant tags on every message and filtering in every consumer.Confirm how tenant identifiers appear in each event payload, choose one topic model for all tenants, and test filtering with two tenants before scaling.
Ordering and replay requirementsStrict per-account ordering needs partition keys and single-threaded processing per key. Replay after a consumer fault needs retained history and a way to rebuild downstream state, which adds design and operating work.Ask only for ordering where a business rule depends on it, and state the retention period needed for replay in the design, not as an afterthought.
Existing broker estate and skillsA team that already runs Kafka or ActiveMQ can reuse clusters, access controls and runbooks. Without that, the work includes provisioning, security configuration and staff training.Reuse the broker your organization already supports, and confirm which of Kafka or ActiveMQ your operations team can run without a vendor.
Consumer business logic and payment side effectsA consumer that initiates a payment, sends a notice or changes a CRM record carries financial and customer impact. It needs idempotency, reconciliation and approval paths, which is most of the testing effort.Keep payment-triggering consumers few and small, and reuse one idempotency pattern (for example, a processed-event store keyed by event ID) across all of them.
Environments and test dataEvent tests need a Fineract instance that emits real business events, a broker in each environment and synthetic accounts that exercise products. Missing test data is a common cause of delay.Plan a non-production Fineract with seeded clients and products, and use a dedicated test topic set that mirrors production names.
Compliance logging of who received whatAssessors and internal audit may ask which consumer received which event, when, and what it did. Building delivery records and retention rules takes design and storage work.Log event ID, consumer, outcome and timestamp in one place from the start, and confirm retention requirements with your compliance team before build.
Fineract upgrades and consumer maintenanceEvent payloads and product behavior can change across quarterly Fineract releases, so consumers need regression tests and version handling. This work recurs for the life of the integration.Version event schemas, keep consumer tests in the upgrade pipeline, and check release notes for event changes before each upgrade.
Broker hosting and monitoringBroker capacity, storage, patching, access reviews and lag alerts recur after go-live, whether run internally or by a vendor.Ask for a quote that separates one-time build from recurring broker and monitoring support, and set alerts on consumer lag and dead-letter volume.

Designing consumers that survive duplicates, retries and out-of-order events

Assume at-least-once delivery from the start. A broker acknowledgment can be lost, a publisher can retry after a timeout, and a consumer can crash after doing its work but before committing its offset, so the same Fineract event (for example a ClientCreated or loan repayment event) can arrive two or more times. Ordering is not guaranteed either. Events for one loan can land on different Kafka partitions or JMS queues, consumers run in parallel, and a retry can deliver an older event after a newer one. Treat each message as a notification that something happened, not as an instruction that must run in sequence. Confirm with your Fineract operations team and broker administrators which delivery and redelivery settings apply in your environment, and test them with deliberate duplicates before go-live.

Make every handler idempotent by recording a stored event identity before doing any work. Use a unique key built from the event's own identifier, its type, and the Fineract tenant (the Fineract-Platform-TenantId context), and write it to your consumer's database in the same transaction as the state change it produces. A duplicate then finds the key and exits. For late events, compare the event's account version or timestamp with the last version your consumer applied. If an event describes a loan that has since changed, either apply it to a projection that tolerates history or park it for review, but never let it overwrite newer state. Keep side effects such as payments, customer messages or CRM updates behind one guarded step with its own idempotency key, so that a retry cannot send a second payment or SMS even when the surrounding code is retried.

Version event schemas explicitly. Fineract can change payload fields between releases, and the quarterly release cadence means an upgrade may arrive while consumers are still expecting the old shape. Put a schema version in every message, validate against it on arrival, and reject or quarantine unknown versions rather than guessing at missing fields. Keep the mapping from Fineract payloads to your internal model in one adapter so that an upgrade touches one place. Finally, never treat an event as the authoritative balance. Events tell a consumer that something changed; they are not a ledger. Any consumer that needs a balance, a repayment status or an account state should query Fineract's REST APIs for the current value, or reconcile its projection against Fineract on a schedule and record the differences.

How to secure broker access, payloads and tenant boundaries

Events leave the Fineract trust boundary the moment they reach a broker, so the same care given to the API applies to the broker, its accounts and what each message carries. The cards below cover credentials, transport, access rights, payload content, tenant identity and audit of who reads or replays events.

Replace every default credential

Fineract's documented development login (username mifos with a default password) must be changed for any real deployment, and the same rule applies to the broker's admin and default accounts. Confirm the Fineract credential settings and the broker's user store in your environment, and check that no default account remains enabled in staging copies that connect to production brokers. Store broker passwords in a secrets manager, not in deployment files.

Fineract docs

Encrypt broker connections

Use TLS for every connection between Fineract, the brokers and consumers, and hold it to the same standard your team applies to the Fineract API, where HTTPS only is strongly encouraged. Confirm the TLS and SSL settings for your chosen broker and client libraries, including certificate validation on the client side, since a client that skips verification defeats encryption. Keep the cipher and protocol choices under review as part of the normal platform patch cycle.

Separate accounts with least privilege

Give each producer and each consumer its own broker account, with publish rights only on the topics or queues it owns and read rights only on what it needs. Shared accounts make it impossible to tell which system wrote or read an event, and they widen the blast radius of a leaked password. Confirm how your broker expresses topic and queue permissions, and review them whenever a consumer is added or retired.

Keep personal data and KYC out of events

Events should carry identifiers and the minimum fields a consumer needs, such as a client ID, event type and status, rather than full client records. KYC documents, identity numbers and scanned files should never be placed in a payload, because brokers retain messages and replay tools copy them. Map each event schema with the compliance team, and confirm which fields are populated by the event serializer in your Fineract version before consumers depend on them.

Carry and enforce the tenant identifier

Fineract is multi-tenant and API requests identify the institution with the Fineract-Platform-TenantId header, so every published event should carry the tenant identifier as a field or message header. Consumers must check that identifier and route or reject events accordingly, rather than trusting the topic name alone. Test with events from two tenants to confirm that a consumer configured for one institution never processes another's account changes.

Log access to read, replay and purge

Record who connects to each topic or queue, who consumes from it, and who resets offsets, replays messages or purges data. These are the operations that expose historical account changes, so they deserve audit entries that name the person or service account involved. Confirm which broker audit features are available in your version and where logs are shipped, and set alerts for administrative actions outside change windows.

How to test that Fineract events arrive once, in the right tenant and fail safely

Start by proving that each event type fires for the intended API action in a non-production tenant. Create a client, open a loan and post a repayment, then confirm that a message appears on the expected topic or queue for each action, such as ClientCreated for client creation. Check that the tenant identifier carried in the event matches the Fineract-Platform-TenantId header used on the originating call, and that payload fields match the contract agreed with each consumer team. Run the same checks against two tenants at once so a message from one institution cannot land in another institution's consumer group. Because publishing is disabled by default, record the exact configuration flags that enable it in the environment under test, so the test evidence shows what was switched on.

Next, test the failure paths on purpose. Replay the same business action and confirm that consumers, not Fineract, absorb the duplicate, so each downstream side effect such as a payment instruction, notification or CRM update happens once. Then stop the broker during a transaction and record what Fineract does: whether the API call fails, whether the business change is rolled back, whether the event is lost, queued internally or retried, and what appears in the logs. The expected behavior on publish failure must be confirmed against the Fineract release in use, because it is not something to assume from the event feature alone. Document the answer as a test result, not as a design assumption.

Finally, replay a batch from the dead-letter destination and confirm idempotency by checking that no account is debited, credited or notified twice. Then run a reconciliation for a sample of accounts: compare Fineract balances and transaction histories against the downstream payment, notification, CRM and reporting records, and investigate every difference before sign-off. Keep the sample and the results as evidence for the operations team, since they will need the same checks after each Fineract upgrade.

Questions teams ask before building Fineract event integrations

Are Fineract external events turned on by default?

No. Publishing Fineract business events, such as ClientCreated, to ActiveMQ, another JMS broker or Apache Kafka is disabled by default, according to the Fineract README. Someone must enable and configure it deliberately for each environment. Before switching it on, confirm which events you need, which broker receives them, and who owns the topics or queues. Enabling events in a test environment first lets the team check payload content and volume before any downstream system depends on them.

Should we choose Kafka or ActiveMQ for Fineract events?

It depends on your existing estate, your replay needs and your team's skills. If your organization already runs Kafka and has people who operate it, publishing there usually keeps operations in one place. If you already run a JMS broker that other core systems use, ActiveMQ may fit better. Ask whether consumers need to re-read history after a failure, because that requirement favors a log-based design. Also confirm which broker your Fineract batch partitioning setup will use, since the README notes that remote partitioning is coordinated through either ActiveMQ or Kafka.

How long does a Fineract event integration take, and what drives the time?

The duration depends on how many consumers you need, how many event types each one reads, and how complex the downstream logic is. Work usually includes agreeing the event catalog, configuring the publisher in Fineract, building or testing each consumer, and proving that failures are handled. Ask any provider for a timeline built from a written list of consumers and events, not from a single headline figure. Time also grows when the bank's security and compliance reviews must approve each payload before go-live.

What does the bank's own team need to provide?

Plan for four groups of people. Broker owners manage topics or queues, retention, access and capacity. Consumer owners in payments, notifications, CRM and reporting define what each system must do with each event. Compliance and data protection staff sign off on which personal and account fields may leave Fineract. Test-data owners provide realistic but non-production accounts and clients so consumers can be exercised safely. Agreeing these named roles early prevents the most common delays in event projects.

Can our in-house team build the Fineract event integration alone?

Often yes, if the team already knows Fineract's REST APIs, the chosen broker and the consumer systems involved. The harder parts are usually not the publishing setting itself but idempotent consumers, handling duplicate or out-of-order messages, dead-letter handling, and testing reconciliation between Fineract balances and downstream records. Ask whether your engineers have built these patterns before. A partner can review the design, run a short pilot and document the runbook, while your team keeps ownership of day-to-day operations.

What should a fixed-scope quote for this work list?

Ask for a written list of the event types in scope, the broker and version, each consumer system and the exact behavior it must implement, and the environments included. The quote should also name the deliverables: configuration, consumer code or changes, test cases, failure-handling design, monitoring, a runbook and knowledge transfer. Confirm what is excluded, such as changes to the consumer systems, broker hosting, and compliance evidence. Finally, ask how retesting is handled when Fineract is upgraded to a new quarterly release.

What sensitive data should events carry, and who approves it?

Only fields that a consumer has a documented need for should leave Fineract. Client identifiers, account numbers, balances and personal details each carry different risk, and some may need masking, tokenization or omission. Compliance and data protection staff should approve the payload schema for each event type before production use. Also confirm broker access controls, encryption in transit, and how long messages are retained, because a broker that keeps history can hold the same personal data as the source system.

How DeployOpen scopes, builds and hands over Fineract event integrations

DeployOpen plans, implements and documents Apache Fineract event integrations inside the client's own infrastructure, so the publishing setup, consumers and broker stay under the client's control. Each engagement starts from a written, fixed scope that names the events, brokers, consumers and handover deliverables before any build work begins.

How we scope

  • Inventory which Fineract business events each downstream system needs, such as ClientCreated, and which ones should stay internal.
  • Confirm whether the client runs ActiveMQ or Kafka, and record the broker versions, hosting and access model in the written scope.
  • Agree a fixed scope covering event contracts, consumer count, environments and test evidence, with ongoing support available as a retainer.

How we build

  • Enable external event publishing in a non-production Fineract instance and verify the configuration against the client's own broker setup.
  • Build consumers that handle duplicate, out-of-order and replayed messages, with idempotent writes and dead-letter handling.
  • Test event delivery alongside Close of Business and tenant-specific behavior, since the publishing feature is disabled by default.

How we hand over

  • Deliver a written event catalogue with payload fields, topic or queue names, ordering assumptions and retry rules for each consumer.
  • Document the configuration keys, broker credentials handling and access controls used, so the client's team can review them.
  • Walk the client's engineers through runbooks for consumer lag, poison messages and replaying events after an outage.

How we support

  • Review event integrations again when moving to a new quarterly Fineract release, since payload or configuration changes need regression testing.
  • Offer retainer support for consumer fixes, broker changes and periodic testing of event delivery under load.
  • Confirm support boundaries in the written agreement, including who owns the broker, the consumers and the Fineract instance.

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.