SlideShare a Scribd company logo
Creating Custom Aggregator
- By Rahul Kumar
Custom Aggregator
Create your own Filter implementation by
Implementing import org.mule.routing.AbstractAggregator interface
Overriding the standard implementations of import org.mule.routing.AbstractAggregator like
org.mule.routing.SimpleCollectionAggregator (used in Collection Aggregator
component), org.mule.routing.MessageChunkAggregator (used in Message Chunk
Aggregator component) and many more
Snippet for Custom
Aggregator
import org.mule.DefaultMuleEvent;
import org.mule.DefaultMuleMessage;
import org.mule.api.MuleContext;
import org.mule.api.MuleEvent;
import org.mule.api.store.ObjectStoreException;
import org.mule.api.transformer.TransformerException;
import org.mule.routing.AbstractAggregator;
import org.mule.routing.AggregationException;
import org.mule.routing.EventGroup;
import org.mule.routing.correlation.CollectionCorrelatorCallback;
import org.mule.routing.correlation.EventCorrelatorCallback;
import org.mule.util.concurrent.ThreadNameHelper;
import java.util.Iterator;
public class TestAggregator extends AbstractAggregator
{
Snippet for Custom
Aggregator
@Override
protected EventCorrelatorCallback getCorrelatorCallback(MuleContext muleContext)
{
return new CollectionCorrelatorCallback(muleContext,false,storePrefix)
{
@Override
public MuleEvent aggregateEvents(EventGroup events) throws AggregationException
{
StringBuffer buffer = new StringBuffer(128);
try
{
for (Iterator<MuleEvent> iterator = events.iterator(); iterator.hasNext();)
{
MuleEvent event = iterator.next();
try
{
Snippet for Custom
Aggregator
buffer.append(event.transformMessageToString());
}
catch (TransformerException e)
{
throw new AggregationException(events, null, e);
}
}
}
catch (ObjectStoreException e)
{
throw new AggregationException(events,null,e);
}
logger.debug("event payload is: " + buffer.toString());
return new DefaultMuleEvent(new DefaultMuleMessage(buffer.toString(), muleContext), events.getMessageCollectionEvent());
}
};
}
}
Snippet for Custom
Aggregator
The snippet shown will create acustom Aggregator which will append
payload received from various Mule Events
Configuration
Provide this class in Custom Aggregator component from the palette.
Your custom Aggregator is now ready to use!
Thank You
Ad

More Related Content

What's hot (20)

Martin Anderson - threads v actors
Martin Anderson - threads v actorsMartin Anderson - threads v actors
Martin Anderson - threads v actors
bloodredsun
 
Retrofit library for android
Retrofit library for androidRetrofit library for android
Retrofit library for android
InnovationM
 
Karma - JS Test Runner
Karma - JS Test RunnerKarma - JS Test Runner
Karma - JS Test Runner
Sebastiano Armeli
 
Creating global functions
Creating global functionsCreating global functions
Creating global functions
Rahul Kumar
 
Creating custom filter
Creating custom filterCreating custom filter
Creating custom filter
Rahul Kumar
 
React table tutorial use filter (part 2)
React table tutorial use filter (part 2)React table tutorial use filter (part 2)
React table tutorial use filter (part 2)
Katy Slemon
 
AngularJS Unit Testing w/Karma and Jasmine
AngularJS Unit Testing w/Karma and JasmineAngularJS Unit Testing w/Karma and Jasmine
AngularJS Unit Testing w/Karma and Jasmine
foxp2code
 
Intro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJSIntro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJS
Jim Lynch
 
Test-Driven Development of AngularJS Applications
Test-Driven Development of AngularJS ApplicationsTest-Driven Development of AngularJS Applications
Test-Driven Development of AngularJS Applications
FITC
 
Javascript: master this
Javascript: master thisJavascript: master this
Javascript: master this
Barak Drechsler
 
Reactive Thinking in Java
Reactive Thinking in JavaReactive Thinking in Java
Reactive Thinking in Java
Yakov Fain
 
Functional Reactive Endpoints using Spring 5
Functional Reactive Endpoints using Spring 5Functional Reactive Endpoints using Spring 5
Functional Reactive Endpoints using Spring 5
Rory Preddy
 
Redux
ReduxRedux
Redux
Maulik Shah
 
Type script for_java_dev_jul_2020
Type script for_java_dev_jul_2020Type script for_java_dev_jul_2020
Type script for_java_dev_jul_2020
Yakov Fain
 
Angular testing
Angular testingAngular testing
Angular testing
Raissa Ferreira
 
React hooks
React hooksReact hooks
React hooks
Sadhna Rana
 
Gigigo Rails Workshop
Gigigo Rails WorkshopGigigo Rails Workshop
Gigigo Rails Workshop
Alex Rupérez
 
Workshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareWorkshop 22: React-Redux Middleware
Workshop 22: React-Redux Middleware
Visual Engineering
 
Sagas Middleware Architecture
Sagas Middleware ArchitectureSagas Middleware Architecture
Sagas Middleware Architecture
Mateusz Bosek
 
anugula2setupbyshubham
anugula2setupbyshubhamanugula2setupbyshubham
anugula2setupbyshubham
Shubham Verma
 
Martin Anderson - threads v actors
Martin Anderson - threads v actorsMartin Anderson - threads v actors
Martin Anderson - threads v actors
bloodredsun
 
Retrofit library for android
Retrofit library for androidRetrofit library for android
Retrofit library for android
InnovationM
 
Creating global functions
Creating global functionsCreating global functions
Creating global functions
Rahul Kumar
 
Creating custom filter
Creating custom filterCreating custom filter
Creating custom filter
Rahul Kumar
 
React table tutorial use filter (part 2)
React table tutorial use filter (part 2)React table tutorial use filter (part 2)
React table tutorial use filter (part 2)
Katy Slemon
 
AngularJS Unit Testing w/Karma and Jasmine
AngularJS Unit Testing w/Karma and JasmineAngularJS Unit Testing w/Karma and Jasmine
AngularJS Unit Testing w/Karma and Jasmine
foxp2code
 
Intro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJSIntro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJS
Jim Lynch
 
Test-Driven Development of AngularJS Applications
Test-Driven Development of AngularJS ApplicationsTest-Driven Development of AngularJS Applications
Test-Driven Development of AngularJS Applications
FITC
 
Reactive Thinking in Java
Reactive Thinking in JavaReactive Thinking in Java
Reactive Thinking in Java
Yakov Fain
 
Functional Reactive Endpoints using Spring 5
Functional Reactive Endpoints using Spring 5Functional Reactive Endpoints using Spring 5
Functional Reactive Endpoints using Spring 5
Rory Preddy
 
Type script for_java_dev_jul_2020
Type script for_java_dev_jul_2020Type script for_java_dev_jul_2020
Type script for_java_dev_jul_2020
Yakov Fain
 
Gigigo Rails Workshop
Gigigo Rails WorkshopGigigo Rails Workshop
Gigigo Rails Workshop
Alex Rupérez
 
Workshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareWorkshop 22: React-Redux Middleware
Workshop 22: React-Redux Middleware
Visual Engineering
 
Sagas Middleware Architecture
Sagas Middleware ArchitectureSagas Middleware Architecture
Sagas Middleware Architecture
Mateusz Bosek
 
anugula2setupbyshubham
anugula2setupbyshubhamanugula2setupbyshubham
anugula2setupbyshubham
Shubham Verma
 

Viewers also liked (15)

Mengugat epistemologi ilmu sosial
Mengugat epistemologi ilmu sosialMengugat epistemologi ilmu sosial
Mengugat epistemologi ilmu sosial
Trisna Nurdiaman
 
Aplicaciones de microextracción en fase sólida en el
Aplicaciones de microextracción en fase sólida en elAplicaciones de microextracción en fase sólida en el
Aplicaciones de microextracción en fase sólida en el
Hiram Aguayo
 
Creación de ambiente virtual de aprender
Creación de ambiente virtual de aprenderCreación de ambiente virtual de aprender
Creación de ambiente virtual de aprender
Diego Guzman
 
RRKResume
RRKResumeRRKResume
RRKResume
Rajendra Kohale
 
MASTER IN MANAGEMENT SCIENCE SEM IV BAMU AURANGABAD
MASTER IN MANAGEMENT SCIENCE SEM IV BAMU AURANGABAD MASTER IN MANAGEMENT SCIENCE SEM IV BAMU AURANGABAD
MASTER IN MANAGEMENT SCIENCE SEM IV BAMU AURANGABAD
Ashwin Mane
 
Semana da juventude pré jmj zonal centro sul
Semana da juventude pré jmj zonal centro sulSemana da juventude pré jmj zonal centro sul
Semana da juventude pré jmj zonal centro sul
Roberto Rabat Chame
 
Habilidades sociales y comunicación asertiva
Habilidades sociales y comunicación asertivaHabilidades sociales y comunicación asertiva
Habilidades sociales y comunicación asertiva
mariosg1234
 
Cuento "La abuela y el ratón
Cuento "La abuela y el ratónCuento "La abuela y el ratón
Cuento "La abuela y el ratón
Suham S. Reyes
 
La Comunicación
La ComunicaciónLa Comunicación
La Comunicación
nticx4tosociales
 
Giuseppe Di Guglielmo presentation - build up 14-15 luglio 2016
Giuseppe Di Guglielmo presentation - build up 14-15 luglio 2016Giuseppe Di Guglielmo presentation - build up 14-15 luglio 2016
Giuseppe Di Guglielmo presentation - build up 14-15 luglio 2016
Fondazione Matera-Basilicata 2019
 
Paul de Theux and Catherine Gerooms
Paul de Theux and Catherine GeroomsPaul de Theux and Catherine Gerooms
Paul de Theux and Catherine Gerooms
mymobileeu
 
W6 once in a house on fire cross cutting.1
W6 once in a house on fire cross cutting.1W6 once in a house on fire cross cutting.1
W6 once in a house on fire cross cutting.1
Gareth Hill
 
Demografi & Statistik Kesihatan
Demografi & Statistik KesihatanDemografi & Statistik Kesihatan
Demografi & Statistik Kesihatan
Muhammad Nasrullah
 
golidilocks-story-powerpoint
golidilocks-story-powerpointgolidilocks-story-powerpoint
golidilocks-story-powerpoint
Mrsjalland
 
Mengugat epistemologi ilmu sosial
Mengugat epistemologi ilmu sosialMengugat epistemologi ilmu sosial
Mengugat epistemologi ilmu sosial
Trisna Nurdiaman
 
Aplicaciones de microextracción en fase sólida en el
Aplicaciones de microextracción en fase sólida en elAplicaciones de microextracción en fase sólida en el
Aplicaciones de microextracción en fase sólida en el
Hiram Aguayo
 
Creación de ambiente virtual de aprender
Creación de ambiente virtual de aprenderCreación de ambiente virtual de aprender
Creación de ambiente virtual de aprender
Diego Guzman
 
MASTER IN MANAGEMENT SCIENCE SEM IV BAMU AURANGABAD
MASTER IN MANAGEMENT SCIENCE SEM IV BAMU AURANGABAD MASTER IN MANAGEMENT SCIENCE SEM IV BAMU AURANGABAD
MASTER IN MANAGEMENT SCIENCE SEM IV BAMU AURANGABAD
Ashwin Mane
 
Semana da juventude pré jmj zonal centro sul
Semana da juventude pré jmj zonal centro sulSemana da juventude pré jmj zonal centro sul
Semana da juventude pré jmj zonal centro sul
Roberto Rabat Chame
 
Habilidades sociales y comunicación asertiva
Habilidades sociales y comunicación asertivaHabilidades sociales y comunicación asertiva
Habilidades sociales y comunicación asertiva
mariosg1234
 
Cuento "La abuela y el ratón
Cuento "La abuela y el ratónCuento "La abuela y el ratón
Cuento "La abuela y el ratón
Suham S. Reyes
 
Giuseppe Di Guglielmo presentation - build up 14-15 luglio 2016
Giuseppe Di Guglielmo presentation - build up 14-15 luglio 2016Giuseppe Di Guglielmo presentation - build up 14-15 luglio 2016
Giuseppe Di Guglielmo presentation - build up 14-15 luglio 2016
Fondazione Matera-Basilicata 2019
 
Paul de Theux and Catherine Gerooms
Paul de Theux and Catherine GeroomsPaul de Theux and Catherine Gerooms
Paul de Theux and Catherine Gerooms
mymobileeu
 
W6 once in a house on fire cross cutting.1
W6 once in a house on fire cross cutting.1W6 once in a house on fire cross cutting.1
W6 once in a house on fire cross cutting.1
Gareth Hill
 
Demografi & Statistik Kesihatan
Demografi & Statistik KesihatanDemografi & Statistik Kesihatan
Demografi & Statistik Kesihatan
Muhammad Nasrullah
 
golidilocks-story-powerpoint
golidilocks-story-powerpointgolidilocks-story-powerpoint
golidilocks-story-powerpoint
Mrsjalland
 
Ad

Similar to Creating custom aggregator (20)

Session 3 - SPRING BOOT - Accessing Actuator EndPoint.pptx
Session 3 - SPRING BOOT - Accessing Actuator EndPoint.pptxSession 3 - SPRING BOOT - Accessing Actuator EndPoint.pptx
Session 3 - SPRING BOOT - Accessing Actuator EndPoint.pptx
trainingdecorpo
 
Protractor framework architecture with example
Protractor framework architecture with exampleProtractor framework architecture with example
Protractor framework architecture with example
shadabgilani
 
Integration made easy with Apache Camel
Integration made easy with Apache CamelIntegration made easy with Apache Camel
Integration made easy with Apache Camel
Rosen Spasov
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
chrisb206 chrisb206
 
Annotation Processing
Annotation ProcessingAnnotation Processing
Annotation Processing
Jintin Lin
 
Improving the Accumulo User Experience
 Improving the Accumulo User Experience Improving the Accumulo User Experience
Improving the Accumulo User Experience
Accumulo Summit
 
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at Runtime
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at RuntimeOSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at Runtime
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at Runtime
NETWAYS
 
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMixEasy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
elliando dias
 
Riding Apache Camel
Riding Apache CamelRiding Apache Camel
Riding Apache Camel
Apache Event Beijing
 
Angular performance slides
Angular performance slidesAngular performance slides
Angular performance slides
David Barreto
 
QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger
Robert-Emmanuel Mayssat
 
JavaScript code generator with Yeoman
JavaScript code generator with YeomanJavaScript code generator with Yeoman
JavaScript code generator with Yeoman
tomi vanek
 
Workshop 13: AngularJS Parte II
Workshop 13: AngularJS Parte IIWorkshop 13: AngularJS Parte II
Workshop 13: AngularJS Parte II
Visual Engineering
 
Architecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVCArchitecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVC
marcocasario
 
Angular2RoutingSetupByShubham
Angular2RoutingSetupByShubhamAngular2RoutingSetupByShubham
Angular2RoutingSetupByShubham
Shubham Verma
 
Front End performance as a Continuous Integration - Part1
Front End performance as a Continuous Integration - Part1Front End performance as a Continuous Integration - Part1
Front End performance as a Continuous Integration - Part1
Tarence DSouza
 
Global Exception Handling Custom Error Connector In MuleSoft
Global Exception Handling Custom Error Connector In MuleSoftGlobal Exception Handling Custom Error Connector In MuleSoft
Global Exception Handling Custom Error Connector In MuleSoft
shyamraj55
 
Appium Automation with Kotlin
Appium Automation with KotlinAppium Automation with Kotlin
Appium Automation with Kotlin
RapidValue
 
using Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API'susing Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API's
Antônio Roberto Silva
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JS
Bipin
 
Session 3 - SPRING BOOT - Accessing Actuator EndPoint.pptx
Session 3 - SPRING BOOT - Accessing Actuator EndPoint.pptxSession 3 - SPRING BOOT - Accessing Actuator EndPoint.pptx
Session 3 - SPRING BOOT - Accessing Actuator EndPoint.pptx
trainingdecorpo
 
Protractor framework architecture with example
Protractor framework architecture with exampleProtractor framework architecture with example
Protractor framework architecture with example
shadabgilani
 
Integration made easy with Apache Camel
Integration made easy with Apache CamelIntegration made easy with Apache Camel
Integration made easy with Apache Camel
Rosen Spasov
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
chrisb206 chrisb206
 
Annotation Processing
Annotation ProcessingAnnotation Processing
Annotation Processing
Jintin Lin
 
Improving the Accumulo User Experience
 Improving the Accumulo User Experience Improving the Accumulo User Experience
Improving the Accumulo User Experience
Accumulo Summit
 
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at Runtime
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at RuntimeOSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at Runtime
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at Runtime
NETWAYS
 
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMixEasy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
Easy Enterprise Integration Patterns with Apache Camel, ActiveMQ and ServiceMix
elliando dias
 
Angular performance slides
Angular performance slidesAngular performance slides
Angular performance slides
David Barreto
 
QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger
Robert-Emmanuel Mayssat
 
JavaScript code generator with Yeoman
JavaScript code generator with YeomanJavaScript code generator with Yeoman
JavaScript code generator with Yeoman
tomi vanek
 
Workshop 13: AngularJS Parte II
Workshop 13: AngularJS Parte IIWorkshop 13: AngularJS Parte II
Workshop 13: AngularJS Parte II
Visual Engineering
 
Architecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVCArchitecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVC
marcocasario
 
Angular2RoutingSetupByShubham
Angular2RoutingSetupByShubhamAngular2RoutingSetupByShubham
Angular2RoutingSetupByShubham
Shubham Verma
 
Front End performance as a Continuous Integration - Part1
Front End performance as a Continuous Integration - Part1Front End performance as a Continuous Integration - Part1
Front End performance as a Continuous Integration - Part1
Tarence DSouza
 
Global Exception Handling Custom Error Connector In MuleSoft
Global Exception Handling Custom Error Connector In MuleSoftGlobal Exception Handling Custom Error Connector In MuleSoft
Global Exception Handling Custom Error Connector In MuleSoft
shyamraj55
 
Appium Automation with Kotlin
Appium Automation with KotlinAppium Automation with Kotlin
Appium Automation with Kotlin
RapidValue
 
using Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API'susing Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API's
Antônio Roberto Silva
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JS
Bipin
 
Ad

More from Rahul Kumar (20)

Combine collections transformer
Combine collections transformerCombine collections transformer
Combine collections transformer
Rahul Kumar
 
Creating custom object store
Creating custom object storeCreating custom object store
Creating custom object store
Rahul Kumar
 
Using parse template component
Using parse template componentUsing parse template component
Using parse template component
Rahul Kumar
 
Using groovy component
Using groovy componentUsing groovy component
Using groovy component
Rahul Kumar
 
Using expression component
Using expression componentUsing expression component
Using expression component
Rahul Kumar
 
Byte array to hex string transformer
Byte array to hex string transformerByte array to hex string transformer
Byte array to hex string transformer
Rahul Kumar
 
Hex string to byte array transformer
Hex string to byte array transformerHex string to byte array transformer
Hex string to byte array transformer
Rahul Kumar
 
XML to DOM Transformer
XML to DOM TransformerXML to DOM Transformer
XML to DOM Transformer
Rahul Kumar
 
Dom to xml transformer
Dom to xml transformerDom to xml transformer
Dom to xml transformer
Rahul Kumar
 
Object to input stream transformer
Object to input stream transformerObject to input stream transformer
Object to input stream transformer
Rahul Kumar
 
Byte array to object transformer
Byte array to object transformerByte array to object transformer
Byte array to object transformer
Rahul Kumar
 
Byte array to string transformer
Byte array to string transformerByte array to string transformer
Byte array to string transformer
Rahul Kumar
 
Object to string transformer
Object to string transformerObject to string transformer
Object to string transformer
Rahul Kumar
 
Csv to json transform in simple steps
Csv to json transform in simple stepsCsv to json transform in simple steps
Csv to json transform in simple steps
Rahul Kumar
 
Using scatter gather
Using scatter gatherUsing scatter gather
Using scatter gather
Rahul Kumar
 
Choice router
Choice routerChoice router
Choice router
Rahul Kumar
 
Using idempotent filter
Using idempotent filterUsing idempotent filter
Using idempotent filter
Rahul Kumar
 
Using expression filter
Using expression filterUsing expression filter
Using expression filter
Rahul Kumar
 
Using JSON Schema Validator
Using JSON Schema ValidatorUsing JSON Schema Validator
Using JSON Schema Validator
Rahul Kumar
 
Quartz connector
Quartz connectorQuartz connector
Quartz connector
Rahul Kumar
 
Combine collections transformer
Combine collections transformerCombine collections transformer
Combine collections transformer
Rahul Kumar
 
Creating custom object store
Creating custom object storeCreating custom object store
Creating custom object store
Rahul Kumar
 
Using parse template component
Using parse template componentUsing parse template component
Using parse template component
Rahul Kumar
 
Using groovy component
Using groovy componentUsing groovy component
Using groovy component
Rahul Kumar
 
Using expression component
Using expression componentUsing expression component
Using expression component
Rahul Kumar
 
Byte array to hex string transformer
Byte array to hex string transformerByte array to hex string transformer
Byte array to hex string transformer
Rahul Kumar
 
Hex string to byte array transformer
Hex string to byte array transformerHex string to byte array transformer
Hex string to byte array transformer
Rahul Kumar
 
XML to DOM Transformer
XML to DOM TransformerXML to DOM Transformer
XML to DOM Transformer
Rahul Kumar
 
Dom to xml transformer
Dom to xml transformerDom to xml transformer
Dom to xml transformer
Rahul Kumar
 
Object to input stream transformer
Object to input stream transformerObject to input stream transformer
Object to input stream transformer
Rahul Kumar
 
Byte array to object transformer
Byte array to object transformerByte array to object transformer
Byte array to object transformer
Rahul Kumar
 
Byte array to string transformer
Byte array to string transformerByte array to string transformer
Byte array to string transformer
Rahul Kumar
 
Object to string transformer
Object to string transformerObject to string transformer
Object to string transformer
Rahul Kumar
 
Csv to json transform in simple steps
Csv to json transform in simple stepsCsv to json transform in simple steps
Csv to json transform in simple steps
Rahul Kumar
 
Using scatter gather
Using scatter gatherUsing scatter gather
Using scatter gather
Rahul Kumar
 
Using idempotent filter
Using idempotent filterUsing idempotent filter
Using idempotent filter
Rahul Kumar
 
Using expression filter
Using expression filterUsing expression filter
Using expression filter
Rahul Kumar
 
Using JSON Schema Validator
Using JSON Schema ValidatorUsing JSON Schema Validator
Using JSON Schema Validator
Rahul Kumar
 
Quartz connector
Quartz connectorQuartz connector
Quartz connector
Rahul Kumar
 

Recently uploaded (20)

Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 

Creating custom aggregator

  • 2. Custom Aggregator Create your own Filter implementation by Implementing import org.mule.routing.AbstractAggregator interface Overriding the standard implementations of import org.mule.routing.AbstractAggregator like org.mule.routing.SimpleCollectionAggregator (used in Collection Aggregator component), org.mule.routing.MessageChunkAggregator (used in Message Chunk Aggregator component) and many more
  • 3. Snippet for Custom Aggregator import org.mule.DefaultMuleEvent; import org.mule.DefaultMuleMessage; import org.mule.api.MuleContext; import org.mule.api.MuleEvent; import org.mule.api.store.ObjectStoreException; import org.mule.api.transformer.TransformerException; import org.mule.routing.AbstractAggregator; import org.mule.routing.AggregationException; import org.mule.routing.EventGroup; import org.mule.routing.correlation.CollectionCorrelatorCallback; import org.mule.routing.correlation.EventCorrelatorCallback; import org.mule.util.concurrent.ThreadNameHelper; import java.util.Iterator; public class TestAggregator extends AbstractAggregator {
  • 4. Snippet for Custom Aggregator @Override protected EventCorrelatorCallback getCorrelatorCallback(MuleContext muleContext) { return new CollectionCorrelatorCallback(muleContext,false,storePrefix) { @Override public MuleEvent aggregateEvents(EventGroup events) throws AggregationException { StringBuffer buffer = new StringBuffer(128); try { for (Iterator<MuleEvent> iterator = events.iterator(); iterator.hasNext();) { MuleEvent event = iterator.next(); try {
  • 5. Snippet for Custom Aggregator buffer.append(event.transformMessageToString()); } catch (TransformerException e) { throw new AggregationException(events, null, e); } } } catch (ObjectStoreException e) { throw new AggregationException(events,null,e); } logger.debug("event payload is: " + buffer.toString()); return new DefaultMuleEvent(new DefaultMuleMessage(buffer.toString(), muleContext), events.getMessageCollectionEvent()); } }; } }
  • 6. Snippet for Custom Aggregator The snippet shown will create acustom Aggregator which will append payload received from various Mule Events
  • 7. Configuration Provide this class in Custom Aggregator component from the palette. Your custom Aggregator is now ready to use!