How to send MATIP protocol via TCP in camel

classic Classic list List threaded Threaded
5 messages Options
CKV
Reply | Threaded
Open this post in threaded view
|

How to send MATIP protocol via TCP in camel

CKV
I have defined a sample TCP port and tried to send a string value through Camel.
It was success and I got the result also.

Please find the code
for defining the port,
               <route>
                        <from uri="mina:tcp://localhost:5555?sync=false&amp;textline=true"/>
                        <to uri="bean:fileConsumer?method=getTcpConnection1"/>
                </route>
For testing , I used below producertemplate.sendBody to send the string  "Hello World" .
producer.sendBody("mina:tcp://localhost:5555?textline=true&sync=false", "Hello World");

Got value using  String body = exchange.getIn().getBody(String.class);

Now the requirement is we need to get the Type B message coming from MATIP protocol.
Since we are using Apache Camel we would like to get the MATIP protocol through Camel.

Is it possible for us to receive MATIP protocol using Camel.
Please Advice.


Reply | Threaded
Open this post in threaded view
|

Re: How to send MATIP protocol via TCP in camel

Christian Mueller
Administrator
I don't know the MATIP protocol, but it's possible. In general by working
with Mina, you only have to define your encoders and decoders and assign
they to your mina endpoint.

Best,
Christian

Sent from a mobile device
Am 21.12.2012 07:09 schrieb "CKV" <[hidden email]>:

> I have defined a sample TCP port and tried to send a string value through
> Camel.
> It was success and I got the result also.
>
> Please find the code
> for defining the port,
>                <route>
>                         <from
> uri="mina:tcp://localhost:5555?sync=false&amp;textline=true"/>
>                         <to
> uri="bean:fileConsumer?method=getTcpConnection1"/>
>                 </route>
> For testing , I used below producertemplate.sendBody to send the string
> "Hello World" .
> producer.sendBody("mina:tcp://localhost:5555?textline=true&sync=false",
> "Hello World");
>
> Got value using  String body = exchange.getIn().getBody(String.class);
>
> Now the requirement is we need to get the Type B message coming from MATIP
> protocol.
> Since we are using Apache Camel we would like to get the MATIP protocol
> through Camel.
>
> Is it possible for us to receive MATIP protocol using Camel.
> Please Advice.
>
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-send-MATIP-protocol-via-TCP-in-camel-tp5724483.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
CKV
Reply | Threaded
Open this post in threaded view
|

Re: How to send MATIP protocol via TCP in camel

CKV
Thanks very much.

But for MATIP we have a common port number 351 through which we should get the data packets continuously.

Using mina we can define TCP as <from uri="mina:tcp://localhost:5555?sync=false&amp;textline=true"/> 

Is this enough to get the MATIP or do we need to give something like
<from uri="mina:matip://---> 

 
Reply | Threaded
Open this post in threaded view
|

Re: How to send MATIP protocol via TCP in camel

Christian Mueller
Administrator
MATIP = Mapping of Airline Traffic over Internet Protocol (
http://www.ietf.org/rfc/rfc2351.txt)? If yes, this should be feasible with
the camel-netty component...
You have to use mina:tcp://...

Best,
Christian

On Fri, Dec 21, 2012 at 12:51 PM, CKV <[hidden email]>wrote:

> MATIP




--
CKV
Reply | Threaded
Open this post in threaded view
|

Re: How to send MATIP protocol via TCP in camel

CKV
THank You.

Yes  MATIP = Mapping of Airline Traffic over Internet Protocol .

I have given mina and netty  for TCP and is working fine.
Code  :
For mina :
                  <route>
                        <from uri="mina:tcp://localhost:351?sync=false&amp;textline=true"/>
                        <to uri="bean:sampleTCP?method=getTcpConnection"/>
                </route>
For netty :
                <route>
                        <from uri="netty:tcp://localhost:351?sync=false&amp;textline=true"/>
                        <to uri="bean:sampleTCP?method=getTcpConnection1"/>
                </route>

The common port for connecting MATIP is 351. If I give 351 as above ,Is this enough to connect to MATIP.
DO we need any other netty component to include here.