Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
i am trying consume data from the server using port 7000. For which i have written the following camel endpoint.
from("netty:tcp://localhost:7000?sync=true&allowDefaultCodec=false&"
+"encoder=#stringEncoder&decoder=#stringDecoder").to("bean:echoService");
But this is not working. I keep getting bind exception. what i understood is that the above route trying to host server on port 7000.I need to write a client to consume data from 7000. Please provide me reference to write the client to consume data from a port using camel netty end point.
–
I'm not totally clear on what you're asking. But if you're using Camel 2.15 or greater the option of clientMode, found in small print here, may be of use to you.
It'll prevent the pesky bind exception.
Also from what I understand, plain old netty is deprecated and you should be using netty4.
So your route should look something like:
from("netty4:tcp://localhost:7000?sync=true&allowDefaultCodec=false&"
+"encoder=#stringEncoder&decoder=#stringDecoder&clientMode=true").to("bean:echoService");
–
–
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.