---
title: Mule ESB Custom Connector – Centralized Nodinite Logging for MuleSoft Flows
description: "Log Mule ESB flows to Nodinite with the Custom Connector: why it beats Logger and Business Events, how the logging subflow, destination, and Pickup Service work together, which destination to choose, and where to find the implementation guide."
---

# Custom Connector for Mule ESB Logging

The <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Custom Connector gives your Mule ESB 3.6–3.9 flows centralized, structured logging. It replaces the standard [Logger][] and [Business Events][] components with one reusable logging subflow that writes [JSON Log Events][JSON Log Event], with the full message body, to a queue, a table, or a folder. The [Pickup Service][] then brings them to <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>, where business users search them in [Log Views][].

* ✅ Logs the full message body and structured context, not only text lines  
* ✅ One logging subflow: change it once, and every flow follows  
* ✅ Same approach on-premise and in the cloud, without code changes  
* ✅ Retention per [Message Type][Message Types], and business data you can search  

## Understanding Mule ESB Logging with Nodinite

Mule ESB has built-in logging options ([Logger][], [Business Events][]), but they have significant limitations for enterprise integration:

|Feature|Logger|Business Events|<span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Custom Connector|  
|---|---|---|---|  
|<i class="fal fa-coins" aria-hidden="true"></i> **Cost**|✅ Free (built-in)|❌ Requires **Enterprise Edition**|✅ Free template, requires <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> license|  
|<i class="fal fa-file-lines" aria-hidden="true"></i> **Payload Logging**|⚠️ Limited to log level filtering|❌ Cannot log message body|✅ Always logs full message body|  
|<i class="fal fa-list" aria-hidden="true"></i> **Context Properties**|⚠️ Manual implementation|⚠️ Key/value pairs only (no payload)|✅ Structured context with full payload|  
|<i class="fal fa-cloud" aria-hidden="true"></i> **On-Premise/Cloud**|❌ Different configurations required|❌ Different configurations required|✅ **Unified approach** - no code changes when migrating|  
|<i class="fal fa-eye" aria-hidden="true"></i> **Data Visibility**|❌ File-based logs, 12+ hour delays in cloud|⚠️ Real-time tracking UI|✅ Async pickup, fast visibility (minutes)|  
|<i class="fal fa-scale-balanced" aria-hidden="true"></i> **Consistency**|❌ Inconsistent quality across flows|⚠️ Limited metadata|✅ Enforced structure via JSON schema|  
|<i class="fal fa-wrench" aria-hidden="true"></i> **Maintenance**|❌ Requires log rotation/management|⚠️ Requires data retention policies|✅ Centralized log database management|  
|<i class="fal fa-arrows-rotate" aria-hidden="true"></i> **Replacement Effort**|❌ Hardcoded, difficult to change|❌ Hardcoded, difficult to change|✅ Single subflow change updates all flows|  
|<i class="fal fa-calendar-xmark" aria-hidden="true"></i> **Retention Control**|❌ File/folder-based deletion only|❌ Global retention policies|✅ **[Message Type][Message Types]-based retention** - fine-tune by business data type|  

### Architecture: How the Custom Connector Works

<div class="mermaid">
graph LR
    subgraph Mule ESB Server
        subgraph Integration Flows
            roFlow1(fa:fa-sitemap INT001: Invoices)
            roFlow2(fa:fa-sitemap INT002: Exchange rates)
        end
        subgraph Logging Subflow
            roFlow1 --> roLogSink
            roFlow2 --> roLogSink
            roLogSink("fa:fa-bolt Nodinite Custom Connector") --> roDest["fa:fa-list ActiveMQ Queue<br/>fa:fa-database PostgreSQL Table<br/>fa:fa-folder File Folder"]
        end
    end
    subgraph Nodinite Server
        roLogAPI(fa:fa-cloud-arrow-down Log API)
        roPS(fa:fa-truck-pickup Pickup Service)--> roLogAPI
        roDest -.->|"Async pickup"| roPS
    end
</div>

*Architecture: Mule ESB flows invoke the Custom Connector subflow, which formats [JSON Log Events][JSON Log Event] and posts them to a configured destination (queue, database, or folder). The [Pickup Service][] asynchronously fetches the events and forwards them to the [Log API][].*

#### Key Components

|Component|Role|Technology Options|  
|---|---|---|  
|<i class="fal fa-puzzle-piece" aria-hidden="true"></i> **Custom Connector**|Formats Mule message as [JSON Log Event][]|JAR package (Anypoint Studio 6/7)|  
|<i class="fal fa-sitemap" aria-hidden="true"></i> **Logging Subflow**|Centralizes logging logic for reuse|Single Mule subflow invoked by all flows|  
|<i class="fal fa-inbox" aria-hidden="true"></i> **Destination**|Temporary storage for async pickup|ActiveMQ (recommended), PostgreSQL, File, AnypointMQ, [Log API][] (dev only)|  
|<i class="fal fa-gears" aria-hidden="true"></i> **Pickup Service**|Fetches events and forwards to Log API|[Pickup Log Events Service Logging Agent][Pickup Service]|  
|<i class="fal fa-cloud-arrow-up" aria-hidden="true"></i> [Log API][]|Persists events to the [Log Database][Log Databases]|<span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Core Services][] component|  

#### Why Asynchronous Logging?

[Asynchronous logging][Asynchronous Logging] (via queue or database) is **strongly recommended** for production environments because:

* **Non-blocking:** Flow execution continues without waiting for log persistence
* **Resilience:** Destination outages don't block integration flows
* **Scalability:** Queue-based pickup handles high-volume bursts
* **Performance:** No synchronous HTTP calls from Mule flows

<h3 id="destination-options">Destination Options</h3>

|Destination|Pros|Cons|Recommendation|  
|---|---|---|---|  
|<i class="fal fa-cloud-arrow-up" aria-hidden="true"></i> [Log API][] (Synchronous)|Simple setup, no middleware required|Not highly available, blocks flows, doesn't scale|⚠️ **Development/[POC][] only** - avoid in production|  
|<i class="fal fa-inbox" aria-hidden="true"></i> [ActiveMQ][Pickup ActiveMQ]|Free (Open Source), scales well, supports clustering, fail-over capability|Requires ActiveMQ installation and configuration|✅ **Recommended for production**|  
|<i class="fal fa-database" aria-hidden="true"></i> [PostgreSQL][Pickup PostgreSQL]|Scales well, uses existing database infrastructure|Requires table creation and polling configuration|✅ Good alternative if ActiveMQ unavailable|  
|<i class="fal fa-cloud" aria-hidden="true"></i> **AnypointMQ**|Cloud-native, highly available, scales automatically|Requires MuleSoft Enterprise subscription, higher cost|❌ Contact support - not yet supported by [Pickup Service][]|  
|<i class="fal fa-folder" aria-hidden="true"></i> [File Folder][Pickup Folder]|Simple for single-server scenarios|No fail-over, requires file system monitoring|⚠️ Small deployments only|  

## Implementation Guide

The implementation is split into three pages:

|Page|What it covers|
|---|---|
|<i class="fal fa-list-ol" aria-hidden="true"></i> [Implement the Custom Connector][]|Prerequisites, then six steps: download the connector, add it to Anypoint Studio 6 or 7, create the logging subflow, invoke it from your flows, configure the [Pickup Service][], and verify the logging|
|<i class="fal fa-code" aria-hidden="true"></i> [Complete Working Example][Custom Connector - Complete Example]|One Mule configuration with the connector, the ActiveMQ connection, the logging subflow, and a flow that logs at receive, success, and error|
|<i class="fal fa-file-code" aria-hidden="true"></i> [Log Event Content][Custom Connector - Log Event Content]|The mandatory and optional JSON Log Event fields, [Message Types][] and their naming, [Context Options][], repair and resubmit properties, exception handling with [Log Status Codes][], and correlation|

![Mule ESB flow with logging at receive, before processing, and after processing][1]  
*A Mule ESB flow that calls the logging subflow at each milestone; see [Implement the Custom Connector][].*  

## Log Views and Self-Service

Create role-based [Log Views][Add or manage Log View] to empower business users:

1. **Finance Team** - search by `invoiceNumber`, `customerId`, `invoiceAmount`
2. **Operations Team** - search by `orderId`, `shipmentId`, `warehouse`
3. **Support Team** - search by `errorType`, `customerComplaint`, `ticketNumber`

This reduces incidents by enabling self-service troubleshooting. The values become searchable through [Search Fields][] bound to your [Message Types][].

## Best Practices Summary

* **Start small** - implement in 2-3 flows before rolling out organization-wide
* **Use ActiveMQ** for production (best scalability and fail-over)
* **Plan Message Types** during development - they cannot be changed after logging; see [Log Event Content][Custom Connector - Log Event Content]
* **Create Search Field Expressions** for each Message Type before go-live
* **Log at key milestones** - receive, transform, send, error
* **Use meaningful Log Text** - help users understand what happened
* **Add context properties** - enable business-level searching and filtering
* **Implement correlation** - link related events across flows and systems; see [Mule ESB Correlation][]
* **Test pickup service** - verify events reach <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Web Client][]
* **Create Log Views** - empower business users with self-service access

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

<i class="fal fa-list-ol" aria-hidden="true"></i> [Implement the Custom Connector][]  
<i class="fal fa-code" aria-hidden="true"></i> [Complete Working Example][Custom Connector - Complete Example]  
<i class="fal fa-file-code" aria-hidden="true"></i> [Log Event Content][Custom Connector - Log Event Content]  
<i class="fal fa-magnifying-glass-plus" aria-hidden="true"></i> [Add or manage Search Fields][Add or manage Search Field]  
<i class="fal fa-hard-drive" aria-hidden="true"></i> [Add or manage Log Views][Add or manage Log View]  
<i class="fal fa-truck-pickup" aria-hidden="true"></i> [Pickup Log Events Service][Pickup Service]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

<i class="fal fa-hard-drive" aria-hidden="true"></i> [Logging][]  
<i class="fal fa-bolt" aria-hidden="true"></i> [Log Events][Log Event]  
<i class="fal fa-file" aria-hidden="true"></i> [Message Types][]  
<i class="fal fa-magnifying-glass-plus" aria-hidden="true"></i> [Search Fields][]  
<i class="fal fa-table-list" aria-hidden="true"></i> [Log Views][]  
<i class="fal fa-code" aria-hidden="true"></i> [JSON Log Event][]  
<i class="fal fa-cloud-arrow-down" aria-hidden="true"></i> [Log API][]  
<i class="fal fa-cloud-arrow-down" aria-hidden="true"></i> [Asynchronous Logging][]  
<i class="fal fa-link" aria-hidden="true"></i> [Mule ESB Correlation][]  
<i class="fal fa-file-lines" aria-hidden="true"></i> [Logger][]  
<i class="fal fa-calendar-check" aria-hidden="true"></i> [Business Events][]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/LogAgent/Mule/CustomConnector/ExampleFlow.png

[Add or manage Log View]:https://docs.nodinite.com/administration/log-management/log-views/features/add-or-manage-log-view/
[Add or manage Search Field]:https://docs.nodinite.com/administration/log-management/search-fields/features/add-or-manage-search-field/
[Asynchronous Logging]:https://docs.nodinite.com/core-services/log-api/features/asynchronous-logging/
[Business Events]:https://docs.nodinite.com/logging-and-monitoring/mulesoft-anypoint-platform-logging/features/business-events/
[Context Options]:https://docs.nodinite.com/core-services/log-event/features/context-options/
[Core Services]:https://docs.nodinite.com/core-services/overview/
[Custom Connector - Complete Example]:https://docs.nodinite.com/logging-and-monitoring/mulesoft-anypoint-platform-logging/features/custom-connector-complete-example/
[Custom Connector - Log Event Content]:https://docs.nodinite.com/logging-and-monitoring/mulesoft-anypoint-platform-logging/features/custom-connector-log-event-content/
[Implement the Custom Connector]:https://docs.nodinite.com/logging-and-monitoring/mulesoft-anypoint-platform-logging/features/custom-connector-implementation/
[JSON Log Event]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/
[Log API]:https://docs.nodinite.com/core-services/log-api/overview/
[Log Databases]:https://docs.nodinite.com/core-services/log-databases/overview/
[Log Event]:https://docs.nodinite.com/core-services/log-event/overview/
[Log Status Codes]:https://docs.nodinite.com/administration/log-management/log-agents/features/what-is-a-log-status-code/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[Logger]:https://docs.nodinite.com/logging-and-monitoring/mulesoft-anypoint-platform-logging/features/logger/
[Logging]:https://docs.nodinite.com/getting-started/log/overview/
[Message Types]:https://docs.nodinite.com/repository-model/message-types/overview/
[Mule ESB Correlation]:https://docs.nodinite.com/logging-and-monitoring/mulesoft-anypoint-platform-logging/troubleshooting/how-do-i-correlate-logged-events/
[Pickup ActiveMQ]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/features/configurations/activemq/
[Pickup Folder]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/features/configurations/folder/
[Pickup PostgreSQL]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/features/configurations/postgresql/
[Pickup Service]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/overview/
[POC]:https://docs.nodinite.com/install-and-update/getting-started/poc/
[Search Fields]:https://docs.nodinite.com/administration/log-management/search-fields/features/what-is-a-search-field/
[Web Client]:https://docs.nodinite.com/getting-started/overview/