Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6302

Mina UDP default codec should keep the data as byte[]

    XMLWordPrintableJSON

Details

    • Patch Available
    • Unknown

    Description

      The MinaUdpProtocolCodecFactory on the consumer side decodes data from an udp datagram to a byte[].

      byte[] bytes = context.getTypeConverter().convertTo(byte[].class, in);

      On the provider side where it gets back to the wire it gets converted to a string:

      String value = context.getTypeConverter().convertTo(String.class, message);

      and then set to the ByteBuffer with the given charset.

      The result is that the original datagram is not valid anymore. The default codec should the data convert to a byte array or keep the data as byte array.

      Attachments

        1. camel-mina2.patch
          7 kB
          Thomas Termin
        2. camel-mina.patch
          11 kB
          Thomas Termin

        Activity

          People

            davsclaus Claus Ibsen
            tterm001 Thomas Termin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: