I am trying to create a sample application hosted at
"mina:tcp://localhost:9991" that sends a very simple message to a server
hosted at "mina:tcp://localhost:9990".

Now admittedly I have some problems understanding how to do this. My first
approach was to create a class called Message, that had two fields: String
order and String host. However, I am terribly confused on how to do this.

First I tried to follow the loadbalancer-example basing myself on the
ReportGenerator and create a MessageGenerator class that could create a
message and return it:
http://camel.apache.org/loadbalancing-mina-example.html

However, there is a problem, I need parameters to create my Message,
something that doesn't happen when creating the Report from the example. 

By reading Camel in Action In know how to use beans to call methods that
have no parameters, however I still do not understand how I should use them
to call a method that has several parameters (Am I forced to use
processors?)

Then i realized that perhaps I am complicating things a little bit and there
is an easier way to send messages. So I tried another approach that resulted
in this small code (26 lines):
http://pastebin.kde.org/pvedrm6er

But it still does not work. Obviously I am doing something wrong and I don't
get what. So, I have 3 questions:
1 - What is the easiest way to send a very simple message to another server
using Camel?
2 - What is the easiest way to create and send an object that requires
several parameters through Camel?
3 - Is my code wrong? If yes, what is wrong with it?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Send-a-message-in-the-easiest-way-tp5742890.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to