Currently, I have a use case where I need to take messages from RabbitMQ Message Bus, append the message size (in bytes) and output message using HDFS Sink.
To start, I have created my own processor which appends the size to the message. The reason I do this is because the encoding needs to be that of a Google Protocol Buffer.
My app looks like the following:
stream create --name rabbit-to-hdfs --definition "rabbit | delim-protobuf | hdfs "
When HDFS Sink outputs the message I see [B@12768762. I have Google'd around and have seen recommendations to add the following:
spring.cloud.stream.bindings.input.consumer.headerMode=raw
However, this does not see to help me at all ! That said, if I change the app to go to a file using the following:
[input | processor ] | file --binary=true
Then, everything works fine. However, I like the rollover features offered by the HDFS Sink.
Any ideas ?