Uploaded image for project: 'AMQ Streams'
  1. AMQ Streams
  2. ENTMQST-1194

Unhandled exception when decoding invalid JSON

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.3.0.GA
    • Component/s: kafka-bridge
    • Labels:
      None
    • Target Release:
    • Epic Link:
    • Sprint:
      2019.10, 2019.11
    • Story Points:
      0
    • Affects:
      Release Notes

      Description

      When HTTP client tries to consume an invalid JSON message using a JSON consumer, following exception seems to be printed to the log:

      2019-07-29 09:40:44,291 INFO OpenAPI operation = poll (io.strimzi.kafka.bridge.http.HttpBridgeContext) [vert.x-eventloop-thread-1]
      Jul 29, 2019 9:40:44 AM io.vertx.core.impl.ContextImpl
      SEVERE: Unhandled exception
      io.vertx.core.json.DecodeException: Failed to decode: No content to map due to end-of-input
       at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 0]
      	at io.vertx.core.json.Json.decodeValue(Json.java:190)
      	at io.strimzi.kafka.bridge.http.converter.HttpJsonMessageConverter.toMessages(HttpJsonMessageConverter.java:89)
      	at io.strimzi.kafka.bridge.http.converter.HttpJsonMessageConverter.toMessages(HttpJsonMessageConverter.java:20)
      	at io.strimzi.kafka.bridge.http.HttpSinkBridgeEndpoint.lambda$doPoll$5(HttpSinkBridgeEndpoint.java:239)
      	at io.vertx.kafka.client.consumer.impl.KafkaConsumerImpl.lambda$poll$16(KafkaConsumerImpl.java:560)
      	at io.vertx.kafka.client.consumer.impl.KafkaReadStreamImpl.lambda$null$39(KafkaReadStreamImpl.java:729)
      	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:320)
      	at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
      	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
      	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:495)
      	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)
      	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
      	at java.lang.Thread.run(Thread.java:748)
      

      This should be handled in a more graceful way. I also wonder how does it affect other messages received in the same block.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            scholzj JAkub Scholz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: