We are sending the message to kinesis stream from the spring-integration application but while consuming the message via @StreamListener from the kinesis binder application we are getting the special characters like "�� t foo". please find below the code snippet and let me know is there any additional things we have to consider?
Sending message to Kinesis
Message<String> message = MessageBuilder.withPayload("foo")
.setHeader(AwsHeaders.STREAM, TEST_STREAM)
.setHeader("content-type","text/plain;charset=UTF-8")
.build();
kinesisSendChannel.send(message);
receiving Message
Charset UTF8 = Charset.forName("UTF-8");
byte[] bytes = (byte[]) message.getPayload();
String reverted = new String(bytes, UTF8);