KafkaJs schema registry decode wire format

Hi All

I am using Kafkajs and Kafkajs schema registry for JSON messages. And I use below node library to encode with schema registry as a producer. As you see the below uses wire format to encode the message by adding magic byte and registryId prefixed to the payload.

But since the consumer of this message is a Java client. It fails to deserialize it as the message contains prefixed magic byte and registry Anyone faced simillar issue and how to deserialize the same