Skip to content

Commit

Permalink
Fix handling AMQP binary data sent as value type
Browse files Browse the repository at this point in the history
  • Loading branch information
NipunaRanasinghe committed Apr 19, 2023
1 parent 98cc82b commit c3c1e0a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@

import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.qpid.proton.amqp.Binary;
import org.ballerinax.asb.util.ASBConstants;
import org.ballerinax.asb.util.ASBUtils;
import org.ballerinax.asb.util.ModuleUtils;
Expand Down Expand Up @@ -199,6 +200,8 @@ public Object convertAMQPToJava(String messageId, Object amqpValue) {
return (java.util.Date) amqpValue;
case "UUID":
return (UUID) amqpValue;
case "Binary":
return ((Binary) amqpValue).getArray();
default:
log.debug("The type of amqpValue object " + clazz + " is not supported");
return null;
Expand Down

0 comments on commit c3c1e0a

Please sign in to comment.