0

We are trying receive messages from Amqp broker hosted on solace vmr using vertx amqp bridge. We are receiving the following exception when there is special character in the message. Please let us know how to handle this.

ERROR: vert.x-eventloop-thread-0] null.null Unhandled exception java.lang.IllegalArgumentException: Cannot parse String

  • It would be helpful if you can elaborate upon the problem a little more, like what is the special character that you are failing with and sample code around the message listener that you have coded. It can helpful to recreate the problem and provide you good suggestions here. – y ramesh rao Nov 21 '18 at 09:12
  • We are getting the special character like ü in the input message. We are getting cannot parse string exception when AMQP message is getting converted in JsonObject (Vertx). This is happening only when the input message has special charaters as mentioned above. Its happening in the Qpid proton transport layer not in the vertx coding.Kindly let us know if you need any information. – luckarthika Nov 21 '18 at 10:11
  • Below is code snippet: Here vertxMsg is getting null so we are getting java.lang.IllegalArgumentException: Cannot parse String consumer.handler(vertxMsg -> { try{ boolean ret; JsonObject amqpMsgPayload = vertxMsg.body(); String amqpBody = amqpMsgPayload.getString(AmqpConstants.BODY); – luckarthika Nov 21 '18 at 10:11
  • What exactly was sent by the publishing application? It would appear that the publisher has sent the "special character" in some encoding that's Vertex is not expecting. – Russell Sim Nov 22 '18 at 04:42
  • Publisher using UTF-8 for encoding , but it is the special emoji characters that they use that is causing a problem. Vertx client using UTF-8 character for decoding. – luckarthika Nov 22 '18 at 19:33
  • Do we have anything to set encoding at Vertx bridge level or Qpid proton layer to accept special emoji character. – luckarthika Nov 22 '18 at 20:03

0 Answers0