2

Camel route:

 <route>
      <from uri="timer...blah..blah..."/>
      <to uri="mina2:tcp://some_vpn_remote_host:validPort?textline=true&amp;sync=true&amp;minaLogger=true&amp;clientMode=true"/>
      <log message = "${body}"/>
 </route>

Below is the response in Minalogger as HEX codes.. is not what expected.

LoggingFilter INFO RECEIVED: HeapBuffer[pos=0 lim=194 cap=2048: 30 2C 22 31 32 30 22 31 2C 22 53`

But it's not available in exchange body, and connection time out after 30secs. Horrible..! Am I going wrong in options at some point..!?

NB: The same works well with TCP/IP client in JAVA. Because the string is written as bytes[] to the server. Will not be able to modify the Server side.

Tome
  • 3,234
  • 3
  • 33
  • 36
peaceUser
  • 457
  • 5
  • 19
  • It depends on several factors. 1) As the doc says, favor using Netty as the project is more active then Mina. 2) What format is the server returning? Plain string? Byte? Hex? You may need to decode it. – Souciance Eqdam Rashti Sep 16 '16 at 10:12
  • When using textline the other party must include a new line character in the returned data to indicate - end of line. Try setting the textlineDelimiter option to the different values it support – Claus Ibsen Sep 16 '16 at 12:13
  • Okay, so @ Souciance Eqdam Rashti, the response is of type String, and the request is also a string.. @claus in TCP client, we have no delimiters.. as the request are of Transactional String(which ends with 99) as end of string.. – peaceUser Sep 16 '16 at 13:59
  • Then you need to build a custom codec to detect that 99 byte value as end of data marker. – Claus Ibsen Sep 16 '16 at 14:11
  • @Claus, I was experimenting out with netty as Souciance Eqdam Rashti said.. found that the joining your suggestion, the delimiter seting to Null has solved the problem in Netty. Can we have the delimiter extended in Mina too for NULL. – peaceUser Sep 17 '16 at 05:05

0 Answers0