Change content type for RabbitMQ Spring Cloud Stream Starter App

你说的曾经没有我的故事 提交于 2019-12-24 12:07:06

问题


The documentation for the Spring Cloud Stream Starter Apps for the RabbitMQ Source app lists several possible content types, each with a different resulting type for the output payload. However, it doesn't say how to choose which one you want to use. I'm deploying a Spring Cloud Data Flow connecting the Rabbit source to a Log sink, and all I get is the byte array. Even when I explicitly set the content type to "text/plain" in the Rabbit message's header, it shows up in the log sink as a byte array payload with headers: "contentType=application/octet-stream, originalContentType=text/plain".

I've got a vague idea that the answer is to set spring.cloud.stream.bindings.output.content-type to the content type I want the Rabbit source to output, but I don't know where to put this setting within the Spring Cloud Data Flow. I'm new at this, and extremely confused.


回答1:


You can pass Spring Cloud Stream properties in Spring Cloud Data Flow via deployment properties.

You can find more information on this here



来源:https://stackoverflow.com/questions/47850895/change-content-type-for-rabbitmq-spring-cloud-stream-starter-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!