Implement the Custom Connector
Section titled “Implement the Custom Connector”This page takes you from download to verified logging with the Nodinite Custom Connector for Mule ESB. Read the Custom Connector overview first for the architecture and the choice of destination; the field reference is on Log Event Content.
- ✅ One reusable logging subflow for every flow
- ✅ Works in Anypoint Studio 6 and 7
- ✅ Asynchronous delivery through the Pickup Service
Prerequisites
Section titled “Prerequisites”Before implementing the Custom Connector, ensure you have:
- Mule ESB 3.6, 3.7, 3.8, or 3.9 installed
- Anypoint Studio 6 or 7
- Nodinite portal account for connector download
- Destination middleware configured (ActiveMQ, PostgreSQL, or file folder); see Destination Options
- Pickup Log Events Service Logging Agent installed and configured
- Understanding of Asynchronous Logging principles
Step 1: Download the Custom Connector
Section titled “Step 1: Download the Custom Connector”- Log in to the Nodinite portal
- Navigate to Downloads → Logging Agents → Mule ESB Custom Connector
- Download the ZIP file containing the JAR package
Step 2: Add Custom Connector to Anypoint Studio
Section titled “Step 2: Add Custom Connector to Anypoint Studio”For Anypoint Studio 6
Section titled “For Anypoint Studio 6”- Extract the ZIP file
- Copy the JAR file to your Anypoint Studio project's
libfolder - The connector appears in the palette as Nodinite (prefix Log ...)

The Nodinite Custom Connector installed in the Anypoint Studio 6 palette.
For Anypoint Studio 7
Section titled “For Anypoint Studio 7”- Right-click project → Import → Anypoint Studio → Packaged mule application (.jar)
- Click Next
- Browse to extracted JAR location and select the JAR file
- Enter a project name
- Click Finish

Select "Packaged mule application (.jar)" from the import wizard.

Browse to the JAR file location and specify the project name.
Step 3: Create the Logging Subflow
Section titled “Step 3: Create the Logging Subflow”Create a reusable logging subflow that all integration flows will invoke:
- Create a new subflow named
nodinite-logging-subflow - Add the following components:
- Nodinite: Create Log Event - formats the JSON Log Event
- Destination connector - posts event to chosen destination (HTTP for Log API, JMS for ActiveMQ, etc.)
- Set Payload - restores original payload after logging

A reusable logging subflow with Create Log Event and destination components.
Example subflow configuration (ActiveMQ destination)
Section titled “Example subflow configuration (ActiveMQ destination)”<sub-flow name="nodinite-logging-subflow"> <logger message="#[sessionVars.nodiniteLogText]" level="INFO" doc:name="Logger"/> <set-variable variableName="payloadBeforeLogging" value="#[payload]" doc:name="Store Payload"/>
<nodinite:create-log-event config-ref="Nodinite__Configuration" endPointName="#[flowVars.endpointName]" endpointUri="#[flowVars.endpointUri]" endPointDirection="#[sessionVars.nodiniteEndPointDirection]" originalMessageTypeName="#[sessionVars.nodiniteMessageTypeName]" logStatus="#[sessionVars.nodiniteLogStatus]" logText="#[sessionVars.nodiniteLogText]" payload="#[payload]" doc:name="Create JSON Log Event"> <nodinite:context-properties ref="#[sessionVars.nodiniteContextValues]"/> </nodinite:create-log-event>
<jms:outbound-endpoint queue="nodinite.log.events" connector-ref="ActiveMQ" doc:name="Post to ActiveMQ"/>
<set-payload value="#[flowVars.payloadBeforeLogging]" doc:name="Restore Payload"/></sub-flow>Step 4: Invoke the Logging Subflow from Integration Flows
Section titled “Step 4: Invoke the Logging Subflow from Integration Flows”Add logging calls at key points in your integration flows:
- Before transformation - log incoming message
- After transformation - log outgoing message
- Exception handlers - log error conditions; see Exception Handling
- Conditional branches - log routing decisions
- Subflow entry/exit - log component boundaries
Example: File-based integration flow with logging
Section titled “Example: File-based integration flow with logging”
A Mule ESB flow using the Nodinite Custom Connector at the receive, before processing, and after processing steps.
<flow name="invoice-processing-flow"> <file:inbound-endpoint path="/drop/invoices" />
<!-- Log: File Received --> <scripting:component doc:name="Set Logging Variables"> <scripting:script engine="Groovy"><![CDATA[ sessionVars['correlationId'] = message.id; sessionVars['nodiniteMessageTypeName'] = "Invoice#1.0"; sessionVars['nodiniteLogText'] = "File Received"; sessionVars['nodiniteLogStatus'] = 0; sessionVars['nodiniteEndPointDirection'] = 0; sessionVars['nodiniteContextValues'] = [ fileName: flowVars['originalFilename'], fileSize: payload.length ]; return payload; ]]></scripting:script> </scripting:component> <flow-ref name="nodinite-logging-subflow" doc:name="Log Receive"/>
<!-- Process message --> <transformer ref="invoiceTransformer"/>
<!-- Log: Processing Complete --> <scripting:component doc:name="Update Logging Variables"> <scripting:script engine="Groovy"><![CDATA[ sessionVars['nodiniteLogText'] = "Processing Complete"; sessionVars['nodiniteLogStatus'] = 0; sessionVars['nodiniteEndPointDirection'] = 1; sessionVars['nodiniteContextValues'] = [ fileName: flowVars['originalFilename'], invoiceNumber: flowVars['invoiceNumber'], amount: flowVars['invoiceAmount'] ]; return payload; ]]></scripting:script> </scripting:component> <flow-ref name="nodinite-logging-subflow" doc:name="Log Success"/>
<file:outbound-endpoint path="/processed/invoices"/></flow>For one configuration with all parts together, including the connector and ActiveMQ settings and an exception handler, see the Complete Working Example.
Step 5: Configure the Pickup Service
Section titled “Step 5: Configure the Pickup Service”The Pickup Log Events Service Logging Agent fetches events from your configured destination and forwards them to the Log API.
Configuration steps
Section titled “Configuration steps”- Install the Pickup Service on a server with access to your destination middleware
- Configure the pickup source (ActiveMQ queue, PostgreSQL table, or file folder)
- Configure the Log API target endpoint
- Set the pickup interval (recommend 30-60 seconds for production)
- Configure retry and error handling policies
See the Asynchronous Logging and Pickup Service documentation for detailed configuration examples.
Step 6: Verify Logging and Fine-Tune
Section titled “Step 6: Verify Logging and Fine-Tune”-
Deploy and test:
- Deploy your updated Mule flows
- Trigger a test message
- Verify event appears in Nodinite Web Client
-
Review log quality:
- Check that Message Types are correctly set
- Verify Search Fields extract expected values
- Confirm Log Status Codes reflect business outcomes
-
Fine-tune performance:
- Adjust destination batch sizes
- Optimize Pickup Service intervals
- Monitor destination queue/table depths
Next Steps
Section titled “ Next Steps” Log Event Content
Complete Working Example
Pickup Log Events Service
Add or manage Search Fields
Related Topics
Section titled “ Related Topics” Custom Connector for Mule ESB Logging
Asynchronous Logging
Log API
JSON Log Event
Message Types
Search Fields
Log Status Codes