Skip to content
Documentation
Updated 5 minutes to read
Markdown

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

Before implementing the Custom Connector, ensure you have:

  1. Log in to the Nodinite portal
  2. Navigate to Downloads → Logging Agents → Mule ESB Custom Connector
  3. 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”
  1. Extract the ZIP file
  2. Copy the JAR file to your Anypoint Studio project's lib folder
  3. The connector appears in the palette as Nodinite (prefix Log ...)

Nodinite Custom Connector in the Anypoint Studio 6 palette
The Nodinite Custom Connector installed in the Anypoint Studio 6 palette.

  1. Right-click project → Import → Anypoint Studio → Packaged mule application (.jar)
  2. Click Next
  3. Browse to extracted JAR location and select the JAR file
  4. Enter a project name
  5. Click Finish

Import wizard for Anypoint Studio 7 with Packaged mule application selected
Select "Packaged mule application (.jar)" from the import wizard.

Import JAR file dialog with the JAR location and project name
Browse to the JAR file location and specify the project name.

Create a reusable logging subflow that all integration flows will invoke:

  1. Create a new subflow named nodinite-logging-subflow
  2. 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

Logging subflow with the Create Log Event and destination components
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:

  1. Before transformation - log incoming message
  2. After transformation - log outgoing message
  3. Exception handlers - log error conditions; see Exception Handling
  4. Conditional branches - log routing decisions
  5. Subflow entry/exit - log component boundaries

Example: File-based integration flow with logging

Section titled “Example: File-based integration flow with logging”

Mule ESB flow with logging at receive, before processing, and after processing
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.

The Pickup Log Events Service Logging Agent fetches events from your configured destination and forwards them to the Log API.

  1. Install the Pickup Service on a server with access to your destination middleware
  2. Configure the pickup source (ActiveMQ queue, PostgreSQL table, or file folder)
  3. Configure the Log API target endpoint
  4. Set the pickup interval (recommend 30-60 seconds for production)
  5. Configure retry and error handling policies

See the Asynchronous Logging and Pickup Service documentation for detailed configuration examples.

  1. Deploy and test:

    • Deploy your updated Mule flows
    • Trigger a test message
    • Verify event appears in Nodinite Web Client
  2. Review log quality:

  3. Fine-tune performance:

    • Adjust destination batch sizes
    • Optimize Pickup Service intervals
    • Monitor destination queue/table depths

Log Event Content
Complete Working Example
Pickup Log Events Service
Add or manage Search Fields

Custom Connector for Mule ESB Logging
Asynchronous Logging
Log API
JSON Log Event
Message Types
Search Fields
Log Status Codes

...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...