---
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 :Nodinite: 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 :Nodinite:, 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|:Nodinite: Custom Connector|  
|---|---|---|---|  
|:fa-coins: **Cost**|✅ Free (built-in)|❌ Requires **Enterprise Edition**|✅ Free template, requires :Nodinite: license|  
|:fa-file-lines: **Payload Logging**|⚠️ Limited to log level filtering|❌ Cannot log message body|✅ Always logs full message body|  
|:fa-list: **Context Properties**|⚠️ Manual implementation|⚠️ Key/value pairs only (no payload)|✅ Structured context with full payload|  
|:fa-cloud: **On-Premise/Cloud**|❌ Different configurations required|❌ Different configurations required|✅ **Unified approach** - no code changes when migrating|  
|:fa-eye: **Data Visibility**|❌ File-based logs, 12+ hour delays in cloud|⚠️ Real-time tracking UI|✅ Async pickup, fast visibility (minutes)|  
|:fa-scale-balanced: **Consistency**|❌ Inconsistent quality across flows|⚠️ Limited metadata|✅ Enforced structure via JSON schema|  
|:fa-wrench: **Maintenance**|❌ Requires log rotation/management|⚠️ Requires data retention policies|✅ Centralized log database management|  
|:fa-arrows-rotate: **Replacement Effort**|❌ Hardcoded, difficult to change|❌ Hardcoded, difficult to change|✅ Single subflow change updates all flows|  
|:fa-calendar-xmark: **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|  
|---|---|---|  
|:fa-puzzle-piece: **Custom Connector**|Formats Mule message as [JSON Log Event][]|JAR package (Anypoint Studio 6/7)|  
|:fa-sitemap: **Logging Subflow**|Centralizes logging logic for reuse|Single Mule subflow invoked by all flows|  
|:fa-inbox: **Destination**|Temporary storage for async pickup|ActiveMQ (recommended), PostgreSQL, File, AnypointMQ, [Log API][] (dev only)|  
|:fa-gears: **Pickup Service**|Fetches events and forwards to Log API|[Pickup Log Events Service Logging Agent][Pickup Service]|  
|:fa-cloud-arrow-up: [Log API][]|Persists events to the [Log Database][Log Databases]|:Nodinite: [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

### Destination Options {#destination-options}

|Destination|Pros|Cons|Recommendation|  
|---|---|---|---|  
|:fa-cloud-arrow-up: [Log API][] (Synchronous)|Simple setup, no middleware required|Not highly available, blocks flows, doesn't scale|⚠️ **Development/[POC][] only** - avoid in production|  
|:fa-inbox: [ActiveMQ][Pickup ActiveMQ]|Free (Open Source), scales well, supports clustering, fail-over capability|Requires ActiveMQ installation and configuration|✅ **Recommended for production**|  
|:fa-database: [PostgreSQL][Pickup PostgreSQL]|Scales well, uses existing database infrastructure|Requires table creation and polling configuration|✅ Good alternative if ActiveMQ unavailable|  
|:fa-cloud: **AnypointMQ**|Cloud-native, highly available, scales automatically|Requires MuleSoft Enterprise subscription, higher cost|❌ Contact support - not yet supported by [Pickup Service][]|  
|:fa-folder: [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|
|---|---|
|:fa-list-ol: [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|
|:fa-code: [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|
|:fa-file-code: [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 :Nodinite: [Web Client][]
* **Create Log Views** - empower business users with self-service access

## :fa-hand-point-right: Next Steps

:fa-list-ol: [Implement the Custom Connector][]  
:fa-code: [Complete Working Example][Custom Connector - Complete Example]  
:fa-file-code: [Log Event Content][Custom Connector - Log Event Content]  
:fa-magnifying-glass-plus: [Add or manage Search Fields][Add or manage Search Field]  
:fa-hard-drive: [Add or manage Log Views][Add or manage Log View]  
:fa-truck-pickup: [Pickup Log Events Service][Pickup Service]  

## :fa-link-horizontal: Related Topics

:fa-hard-drive: [Logging][]  
:fa-bolt: [Log Events][Log Event]  
:fa-file: [Message Types][]  
:fa-magnifying-glass-plus: [Search Fields][]  
:fa-table-list: [Log Views][]  
:fa-code: [JSON Log Event][]  
:fa-cloud-arrow-down: [Log API][]  
:fa-cloud-arrow-down: [Asynchronous Logging][]  
:fa-link: [Mule ESB Correlation][]  
:fa-file-lines: [Logger][]  
:fa-calendar-check: [Business Events][]  

[1]:{ndm}/Documentation%20Pictures/LogAgent/Mule/CustomConnector/ExampleFlow.png

[Add or manage Log View]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/Add%20or%20Manage%20Log%20View.md
[Add or manage Search Field]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Add%20or%20manage%20Search%20Field.md
[Asynchronous Logging]:{ndr}/Core%20Services/Log%20API/Features/Asynchronous%20Logging.md
[Business Events]:{ndr}/Logging%20and%20Monitoring/MuleSoft%20-%20AnyPoint%20Platform%20-%20Logging/Features/Business%20Events.md
[Context Options]:{ndr}/Core%20Services/Log%20Event/Features/Context%20Options.md
[Core Services]:{ndr}/Core%20Services/Overview.md
[Custom Connector - Complete Example]:{ndr}/Logging%20and%20Monitoring/MuleSoft%20-%20AnyPoint%20Platform%20-%20Logging/Features/Custom%20Connector%20-%20Complete%20Example.md
[Custom Connector - Log Event Content]:{ndr}/Logging%20and%20Monitoring/MuleSoft%20-%20AnyPoint%20Platform%20-%20Logging/Features/Custom%20Connector%20-%20Log%20Event%20Content.md
[Implement the Custom Connector]:{ndr}/Logging%20and%20Monitoring/MuleSoft%20-%20AnyPoint%20Platform%20-%20Logging/Features/Custom%20Connector%20-%20Implementation.md
[JSON Log Event]:{ndr}/Core%20Services/Log%20Event/Features/JSON%20Log%20Event.md
[Log API]:{ndr}/Core%20Services/Log%20API/Overview.md
[Log Databases]:{ndr}/Core%20Services/Log%20Databases/Overview.md
[Log Event]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Log Status Codes]:{ndr}/Administration/1.%20Log%20Management/3.%20Log%20Agents/Features/What%20is%20a%20Log%20Status%20Code.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[Logger]:{ndr}/Logging%20and%20Monitoring/MuleSoft%20-%20AnyPoint%20Platform%20-%20Logging/Features/Logger.md
[Logging]:{ndr}/Getting%20Started/2.%20Log/Overview.md
[Message Types]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[Mule ESB Correlation]:{ndr}/Logging%20and%20Monitoring/MuleSoft%20-%20AnyPoint%20Platform%20-%20Logging/Troubleshooting/How%20do%20I%20correlate%20logged%20events.md
[Pickup ActiveMQ]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Features/Configurations/ActiveMQ.md
[Pickup Folder]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Features/Configurations/Folder.md
[Pickup PostgreSQL]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Features/Configurations/PostgreSQL.md
[Pickup Service]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Overview.md
[POC]:{ndr}/Install%20and%20Update/Getting%20started/POC.md
[Search Fields]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/What%20is%20a%20Search%20Field.md
[Web Client]:{ndr}/Getting%20Started/Overview.md