Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-375 camel-mina improvements
  3. CAMEL-380

camel-mina UDP protocol fails when sending bytes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.0
    • 1.3.0
    • camel-mina
    • None

    Description

      Using a CamelProducer to send bytes to a mina UDP listener fails.

      This unit tests below fails
      Using: "Hello from bytes" as a plain string works fine.

          public void testSendingByteMessages() throws Exception {
              MockEndpoint endpoint = getMockEndpoint("mock:result");
              endpoint.expectedMessageCount(1);
      
              template.sendBody("mina:udp://127.0.0.1:4445", "Hello from bytes".getBytes());
              // sleeping for while to let the mock endpoint get all the message
              Thread.sleep(1000);
      
              assertMockEndpointsSatisifed();
              List<Exchange> list = endpoint.getReceivedExchanges();
              assertEquals("Hello from bytes", list.get(0).getIn().getBody(String.class));
          }
      

      Attachments

        1. camel_380_patch2.txt
          6 kB
          Claus Ibsen
        2. camel_380_patch.txt
          4 kB
          Claus Ibsen

        Activity

          People

            njiang Willem Jiang
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: