Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Mule Meets Zuul: A Centralized Properties Management – Part II, Client-Side

DZone's Guide to

Mule Meets Zuul: A Centralized Properties Management – Part II, Client-Side

· Integration Zone
Free Resource

Today’s data climate is fast-paced and it’s not slowing down. Here’s why your current integration solution is not enough. Brought to you in partnership with Liaison Technologies.

[This article originally written by Eugene Berman.]

Before reading on, please take a look at Part 1 of this post.

Connecting Mule application to Zuul server requires two additional jars in the application class path. One of them is jasypt library which can be downloaded here. The second one is zuul-spring-client. You can download the source and build the jar using Maven.

To configure Zuul client, first add zuul namespace to the mule tag. You will also need spring and context namespaces.

<mule xmlns:context="http://www.springframework.org/schema/context"
	xmlns="http://www.mulesoft.org/schema/mule/core" 
	xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.2"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:zuul="http://www.devnull.org/schema/zuul-spring-client"
	xsi:schemaLocation="
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-current.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.devnull.org/schema/zuul-spring-client http://www.devnull.org/schema/zuul-spring-client.xsd">

Next, configure zuul spring bean and spring context referencing this bean:

<context:property-placeholder properties-ref="MuleMeetZuul"/>
  	
<spring:beans>
    <zuul:properties id="MuleMeetZuul" config="AcmeProperties" host="localhost"  port="8080" 
                     context="/zuul-web-1.5" environment="#{environment['env_name']}">
        <zuul:file-store/>
	<zuul:pbe-decryptor password="#{environment['mule.password']}" algorithm="PBEWITHSHA256AND128BITAES-CBC-BC"/>
    </zuul:properties>
</spring:beans>

Note that the value of the config attribute – config="AcmeProperties" – is the name of the properties set that we created on the Zuul server.

Finally, edit the MULE_HOME/conf/wrapper.conf file on each environment and set the variables for environment name and the password used for encryption:

wrapper.java.additional.4=-Denv_name=prod
wrapper.java.additional.5=-Dmule.password=muleftw

Is iPaaS solving the right problems? Not knowing the fundamental difference between iPaaS and iPaaS+ could cost you down the road. Brought to you in partnership with Liaison Technologies.

Topics:

Published at DZone with permission of Ross Mason, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}