Skip to content

Instantly share code, notes, and snippets.

View gclitheroe's full-sized avatar

Geoff Clitheroe gclitheroe

  • Xero
  • New Zealand
View GitHub Profile
<jms:activemq-connector name="jmsVmDurable" specification="1.1"
brokerURL="${seiscomp.producer.amq.url}" clientId="${mule.serverId}.sc3.producer"
durable="true" persistentDelivery="true">
</jms:activemq-connector>
<jms:activemq-connector name="jmsVmNonDurable" specification="1.1"
brokerURL="${seiscomp.producer.amq.url}" clientId="${mule.serverId}.sc3.producer.nondurable"
durable="false" persistentDelivery="false">
</jms:activemq-connector>
@gclitheroe
gclitheroe / mulestarted.txt
Created January 14, 2012 00:50
Mule started
Mule: both applications are deployed
...
**********************************************************************
* - - + APPLICATION + - - * - - + STATUS + - - *
**********************************************************************
* muletimechatter-1.0-SNAPSHOT * DEPLOYED *
* default * DEPLOYED *
* seiscompproducer-1.0-SNAPSHOT * DEPLOYED *
**********************************************************************
@gclitheroe
gclitheroe / mulejmsfailover.xml
Created January 14, 2012 01:19
Mule JMS failover
<jms:activemq-connector name="jmsVmDurable" specification="1.1"
brokerURL="failover:(${seiscomp.producer.amq.url})" clientId="${mule.serverId}.sc3.producer"
durable="true" persistentDelivery="true">
</jms:activemq-connector>
<jms:activemq-connector name="jmsVmNonDurable" specification="1.1"
brokerURL="failover:(${seiscomp.producer.amq.url})" clientId="${mule.serverId}.sc3.producer.nondurable"
durable="false" persistentDelivery="false">
</jms:activemq-connector>
@gclitheroe
gclitheroe / varnish-ban-config
Created March 3, 2012 05:21
Varnish BAN config
if (req.request == "DELETE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
if (req.http.X-BanExpression) {
ban(req.http.X-BanExpression);
}
else {
ban_url(req.url);
}
@gclitheroe
gclitheroe / mule-varnish-http
Created March 3, 2012 05:22
mule-varnish-http
<http:outbound-endpoint host="localhost" port="${quakevarnish.varnish.port}" method="DELETE">
<property key="X-BanExpression" value="obj.http.X-Url ~ /quakes/*"/>
</http:outbound-endpoint>
@gclitheroe
gclitheroe / mule-props
Created May 11, 2014 00:19
Loading properties in Mule using Spring
<spring:beans>
<context:property-placeholder order="0" ignore-unresolvable="true" location="mule-heart-beat-producer.properties"/>
<context:property-placeholder order="-1" ignore-resource-not-found="true" ignore-unresolvable="true" location="file:/etc/sysconfig/mule-heart-beat-producer.properties"/>
<context:property-placeholder order="1" ignore-unresolvable="true" location="build-version.properties"/>
</spring:beans>
@gclitheroe
gclitheroe / spring-profile
Created May 11, 2014 00:48
spring-profile
<spring:beans profile="production">
<spring:import resource="classpath:mule-logentries-logging.xml"/>
</spring:beans>
@gclitheroe
gclitheroe / le-appender
Created May 11, 2014 01:20
Log Entries appender
# Default log level
log4j.rootCategory=INFO, console, le
log4j.appender.le=com.logentries.log4j.LogentriesAppender
log4j.appender.le.layout=org.apache.log4j.PatternLayout
log4j.appender.le.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss ZZZ} [${host.name}] %-5p: %F:%L %m
log4j.appender.le.Token=${logentries.token}
log4j.appender.le.Debug=False
log4j.appender.le.Ssl=True
@gclitheroe
gclitheroe / mule-script
Last active August 29, 2015 14:01
mule script env vars
#! /bin/sh
# Source networking configuration.
. /etc/sysconfig/network
# Source mule specific config.
if [ -e /etc/sysconfig/mule ]; then
. /etc/sysconfig/mule
fi
@gclitheroe
gclitheroe / mule-conf
Last active August 29, 2015 14:01
mule conf for logging
...
wrapper.java.additional.4=-Dspring.profiles.active="%SPRING_PROFILE%"
wrapper.java.additional.4.stripquotes=TRUE
wrapper.java.additional.5=-Dhost.name="%HOSTNAME%"
wrapper.java.additional.5.stripquotes=TRUE
wrapper.java.additional.6=-Dlogentries.token="%LOGENTRIES_TOKEN%"
wrapper.java.additional.6.stripquotes=TRUE