On Sun Nov 27 00:30:18 2011, newbiee wrote:
Calus:
Thanks for the reply.
I have already gone through the example "MinaTcpTest.java" given chpater 7
and other example. The examples show how the actual route works through unit
testing. I understand that but when it comes to
creating my own route, and executing it in real not thorugh unit testing, I
get stuck.
Can I do something like this:
suppose my command is in a queue "digiQueue" and I want to send the
commnad from "digiQueue" to localhost:8999. Can I do someting like this:
<route>
<from uri="activemq:digiQueue"/>
<to
uri="netty:tcp://localhost:8999?sync=true&codec=#digiCodec,<simple>${body}</simple>,
String.class" />
</route>
Every command being sent from "netty:tcp://localhost:8999" to digi
device starts and ends with "c0". Similarly, message sent from digi device
to "netty:tcp://localhost:8999" starts and ends with "c0". There are many
commands and for each commands there is a different message as a response.
But for the prototype, only one command/message is sufficient.
Perhaps, I will have to use my own codec so I have included
"codec=#digiCodec". I am passing the command by putting the body as an
argument.
The command going to the digi device has to go through SSH or SSL.
Digi device has username/password. So, I will have to set the
username/password as well. How can I do that? Does Camel provide out of the
box component to execute SSH/SSL commands remotely. How can I do this? If
not, what will I have to custom develop?
If you want to use SSH you can take a look at sshd project[1]
I don't suggest you do it youself.
With that you can write a camel component which can interact with the
device with InOut message exchange pattern.
[1]the http://mina.apache.org/sshd/
I want to put the response received from the digi device in another
queue "digiResponse" for further processing. Can I do that by defining
following route:
<route>
<from uri="netty:tcp://localhost:8999 />
<to uri="activemq:digiResponse"/>
</route>
No, you route could like this
<from uri="somewhere" />
<to uri="ssh divice" />
<to uri="activemq:digiResonse" />
Thank you.
--
View this message in context:
http://camel.465427.n5.nabble.com/Remote-Messaging-Using-CAMEL-tp5023683p5025091.html
Sent from the Camel - Users mailing list archive at Nabble.com.
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang