Patrick Dorval
Patrick Dorval

Reputation: 13

Mule 3.5.0 CE creating dynamic inbound endpoints

I am working with a large collection of TCP connections on my mule application and I want to programmatically add inbound endpoints to a composite source.

I have 70+ applications that need to connect to mule where the application is acting as the TCP server and Mule is the TCP client. In Mule 2 there was a way to dynamically add inbound endpoints to the Mule application and this was changed in Mule 3.

Is there a way to add inbound endpoints to one flow or many flows programmatically on mule startup?

I am using Mule 3.5.0 CE. Any input would be greatly appreciated.

Upvotes: 1

Views: 316

Answers (1)

Ryan Carter
Ryan Carter

Reputation: 11606

You need to implement MuleContextAware and Initialisable. Here is a rough example that does it for a list of JMS queues. It will be fairly simple to change this to TCP: https://gist.github.com/ryandcarter/c6d612977585c914114d

It programatically creates a Flow and CompositeSource and calls a vm endpoint to get back into Mule config.

Upvotes: 2

Related Questions