Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Load balancing using Mina example

This example show shows how you can easily use the camelCamel-mina MINA component to design a solution
allowing to distribute for distributing message workload on onto several servers.
These servers are simple TCP/IP servers created by the Apache MINA framework and running run in
separate JVMs. The load balancer pattern of Camel which is used on top of them allows tofor
send sending in a Round Robin model mode the messages created from a camel Camel Bean component
respectively to alternatively between each server running on localhost:9991 and localhost:9992.

The Within this demo starts when every 5th ten seconds, a Report object is created from the camel Camel load balancer server.
This object is send sent by the camel Camel load balancer to a MINA server and where the object is then serialized.
One of the two MINA servers (localhost:9991 and localhost:9992) receives the object and enrich enriches
the message
by setting the field reply of the Report object. The reply is send sent back by the MINA
server to the client,
which then logs the reply on the console.

...

Code Block
mvn clean install 

To run the example, then execute now the following command in the respective folder:

...

and check the result in the console of load balancer.