Skip to content

Ricston/mule-transport-netty-publisher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WELCOME

This is a Mule transport implementation using Netty (http://netty.io) that supports Publish/Subscribe on raw TCP (from a high level perspective, its like JMS topics, but with limited functionality, for example, there is no transaction support, and there it no external broker).

Developed by Ricston Ltd (www.ricston.com).

To compile and package from source, just execute:

mvn package 

Make sure you have the minimum requirements mentioned here below. The above command will also generate the Mule Studio plugin.

All tests are use-cases which you can copy and paste from.

Minimum Requirements

Mule 3.6.x or higher, Maven 3.0.3 or higher (only required for compilation, not required for runtime)

Documentation

Please read the following blog post: http://ricston.com/blog/mule-netty-publisher/. It explains how to use the module. You can also look at the functional tests cases.

Connector Configuration Example

<nettypublisher:config name="nettyPublisher">
	<!-- configure publishers here -->
	<nettypublisher:publishers>
		<!-- we have 2 different publishers, listening on ports 8091 and 8092 -->
		<nettypublisher:publisher key="publisher1">8091</nettypublisher:publisher>
		<nettypublisher:publisher key="publisher2">8092</nettypublisher:publisher>
	</nettypublisher:publishers>
</nettypublisher:config>

Publishing information

<!-- simple flow that receives messages on a VM endpoint and publishes to all 
clients connected to publisher1 (port 8091 from the connector configuration) -->
<flow name="nettyPublisherFlow">
    <vm:inbound-endpoint path="toPublisher" />
    <logger message="#[payload]" level="INFO" />
    <nettypublisher:publish publisher="publisher1" data="#[payload]"/>
</flow>

Starting a Netty Server

<!-- this will start a Netty server on port 8090, each message received will trigger
 this flow. You can configure any Mule processor as in a normal Mule flow -->
<flow name="nettyServerFlow">
    <nettypublisher:server port="8090"/>
    <logger message="#[payload]" level="INFO" />
    
    <!-- your message procesors here -->
</flow>

License

Apache License 2.0 (Please see LICENSE.md)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages