Skip to content

Instantly share code, notes, and snippets.

ricston-git

  • Ricston
Block or report user

Report or block ricston-git

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ricston-git
ricston-git / categorized_functions_exposed_by_library.dwl
Last active Aug 28, 2018
Gist for "Use cases for the readUrl function in DataWeave" blog-post
View categorized_functions_exposed_by_library.dwl
---
{
functionsOnObjects: {
getUniqueKeys: getUniqueKeys,
getKeys: getKeys
},
functionsOnStrings: {
substring: substringFunc
},
functionsOnArrays: {
View QuerySingleFileProcessor.java
public class QuerySingleFileProcessor implements Callable, Startable {
private SftpConnector sftpConnector;
private ImmutableEndpoint immutableEndpoint;
private SftpReceiverRequesterUtil util;
@Inject
private MuleContext muleContext;
View AbstractJob.java
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException
{
muleContext = getMuleContext(jobExecutionContext);
if (muleContext.isPrimaryPollingInstance() ||
TRUE.equals(jobExecutionContext.getJobDetail().getJobDataMap().get(PROPERTY_JOB_DYNAMIC)))
{
doExecute(jobExecutionContext);
}
}
@ricston-git
ricston-git / rabbitmq-manualack.xml
Created Jul 18, 2017
Mule flow for connecting to RabbitMQ using Manual Acknowledgements
View rabbitmq-manualack.xml
<amqp:endpoint exchangeName="main-exchange" queueName="queue1" exchangeDurable="true" name="AMQP_0_9_queue1" responseTimeout="10000" doc:name="AMQP-0-9" routingKey="rk-q1" exchangeType="direct" exchange-pattern="request-response"/>
<amqp:endpoint exchangeName="main-exchange" queueName="queue2" name="AMQP_0_9_queue2" responseTimeout="10000" doc:name="AMQP-0-9" exchangeDurable="true" routingKey="rk-q2" exchangeType="direct"/>
<amqp:connector name="AMQP_0_9_Connector" validateConnections="true" username="administrator" password="password" doc:name="AMQP-0-9 Connector" ackMode="MANUAL"/>
<flow name="rabbitmq-receiveFromServer-queuetestFlow">
<amqp:inbound-endpoint responseTimeout="10000" exchange-pattern="request-response" doc:name="AMQP-MSG-FROM-QUEUE1" ref="AMQP_0_9_queue1" connector-ref="AMQP_0_9_Connector"/>
<byte-array-to-object-transformer returnClass="java.lang.String" doc:name="Byte Array to Object"/>
<logger message="Message from Queue1: #[payload]" level="INFO" doc:name="Logger: Incoming
@ricston-git
ricston-git / rabbitmq-autoack.xml
Created Jul 18, 2017
Mule flow for connecting to RabbitMQ using the default Auto Acknowledgements.
View rabbitmq-autoack.xml
<amqp:endpoint exchangeName="main-exchange" queueName="queue1" exchangeDurable="true" name="AMQP_0_9_queue1" responseTimeout="10000" doc:name="AMQP-0-9" routingKey="rk-q1" exchangeType="direct" exchange-pattern="request-response"/>
<amqp:endpoint exchangeName="main-exchange" queueName="queue2" name="AMQP_0_9_queue2" responseTimeout="10000" doc:name="AMQP-0-9" exchangeDurable="true" routingKey="rk-q2" exchangeType="direct"/>
<amqp:connector name="AMQP_0_9_Connector" validateConnections="true" username="administrator" password="password" doc:name="AMQP-0-9 Connector"/>
<flow name="rabbitmq-receiveFromServer-queuetestFlow">
<amqp:inbound-endpoint responseTimeout="10000" exchange-pattern="request-response" doc:name="AMQP-MSG-FROM-QUEUE1" ref="AMQP_0_9_queue1" connector-ref="AMQP_0_9_Connector"/>
<byte-array-to-object-transformer returnClass="java.lang.String" doc:name="Byte Array to Object"/>
<logger message="Message from Queue1: #[payload]" level="INFO" doc:name="Logger: Incoming from RabbitMQ"/>
View rr-async-complete-flow.xml
<flow name="request-reply-asyncFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP" />
<set-payload value="#[{'1','2','3','1','2','3','1','2','3'}]" doc:name="Set Payload" />
<logger message="#[payload]" level="INFO" doc:name="Logger" />
<request-reply doc:name="Request-Reply">
<vm:outbound-endpoint exchange-pattern="one-way" path="vmRequest" doc:name="VM">
<collection-splitter />
</vm:outbound-endpoint>
<vm:inbound-endpoint exchange-pattern="one-way" path="vmReply" doc:name="VM">
<collection-aggregator />
View rr-vm-splitter-agg.xml
<request-reply doc:name="Request-Reply">
<vm:outbound-endpoint exchange-pattern="one-way" path="vmRequest" doc:name="VM">
<collection-splitter />
</vm:outbound-endpoint>
<vm:inbound-endpoint exchange-pattern="one-way" path="vmReply" doc:name="VM">
<collection-aggregator />
</vm:inbound-endpoint>
</request-reply>
View rr-sync-processing.xml
<flow name="request-reply-asyncFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<set-payload value="#[{'1','2','3','1','2','3','1','2','3'}]" doc:name="Set Payload"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
<collection-splitter doc:name="Collection Splitter"/>
<request-reply doc:name="Request-Reply">
<vm:outbound-endpoint exchange-pattern="one-way" path="vmRequest" doc:name="VM"/>
<vm:inbound-endpoint exchange-pattern="one-way" path="vmReply" doc:name="VM"/>
</request-reply>
<collection-aggregator failOnTimeout="true" doc:name="Collection Aggregator"/>
@ricston-git
ricston-git / Gruntfile.js
Created May 19, 2016
Gist for "Java Build Tools, JavaScript Package Managers and Task Runners (Part 3)" blog-post.
View Gruntfile.js
/* File: Gruntfile.js */
//wrapper function
module.exports = function(grunt) {
//Project and task configuration.
grunt.initConfig({
//this task is responsible for deleting all files and sub-folders under the folder "/prod".
clean: {
//here we use a globbing pattern to match everything inside the `prod` folder
@ricston-git
ricston-git / gulpfile.js
Created May 18, 2016
Gist for "Java Build Tools, JavaScript Package Managers and Task Runners (Part 3)" blog-post.
View gulpfile.js
/* File: gulpfile.js */
//import our gulp packages
var gulp = require('gulp'),
gutil = require('gulp-util')
minify = require('gulp-minify')
del = require('del');
//create a 'default' task - to be executed when 'gulp' is run from terminal. The 'default' task depends on 'clean-prod' and 'minify-js' tasks; in that order.
gulp.task('default', ['minify-js']);
You can’t perform that action at this time.