You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by doug5791 <to...@uwgb.edu> on 2014/03/01 03:05:21 UTC

How to test Mina Server?

I have mina set up to listen to a particular port like this:
from("mina:tcp://0.0.0.0:8999?textline=true&sync=true").to(xxx);

If I use an application like "SocketTester" I am able to connect to the
instance of mina and send it messages in the form of strings and see a
response of what was sent. 

What I would like to do is create a route in another class that will feed X
number of strings to the already running "mina-route"; the only thing I
could think to do was use a ProducerTemplate to send the strings, like the
following:
ProducerTemplate template = context.createProducerTemplate();
template.sendBody("mina:tcp://localhost:8999", string);

However, that was not successful.

Could someone let me know if there is a good way to create a "client" that
will send a bunch of strings to my mina route that is listening?




--
View this message in context: http://camel.465427.n5.nabble.com/How-to-test-Mina-Server-tp5748139.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to test Mina Server?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

See the unit tests of camel-mina itself to find examples
https://github.com/apache/camel/tree/master/components/camel-mina

On Sat, Mar 1, 2014 at 3:05 AM, doug5791 <to...@uwgb.edu> wrote:
> I have mina set up to listen to a particular port like this:
> from("mina:tcp://0.0.0.0:8999?textline=true&sync=true").to(xxx);
>
> If I use an application like "SocketTester" I am able to connect to the
> instance of mina and send it messages in the form of strings and see a
> response of what was sent.
>
> What I would like to do is create a route in another class that will feed X
> number of strings to the already running "mina-route"; the only thing I
> could think to do was use a ProducerTemplate to send the strings, like the
> following:
> ProducerTemplate template = context.createProducerTemplate();
> template.sendBody("mina:tcp://localhost:8999", string);
>
> However, that was not successful.
>
> Could someone let me know if there is a good way to create a "client" that
> will send a bunch of strings to my mina route that is listening?
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-test-Mina-Server-tp5748139.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io