如何使用Logstash&设置内容类型rabbitmq输出? [英] How to set content type with Logstash & rabbitmq output?

查看:1080
本文介绍了如何使用Logstash&设置内容类型rabbitmq输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用logstash解析日志,并通过rabbitmq发送结果.使用这些结果的应用程序正在等待content_type设置为"application/json"的消息.目前,我的消息没有任何属性,我的应用程序无法处理该消息.

I want to parse logs with logstash and sends the results via rabbitmq. The application using these results is waiting for a message with content_type set to "application/json". For now, my messages have no properties and my application is not able to process the message.

您能告诉我logstash如何将属性"content_type"设置为"application/json"的消息发送到rabbitmq吗?

Could you please tell me how logstash sends a message to rabbitmq with a property "content_type" set to "application/json"?

预先感谢&最好的问候,

Thanks beforehand & best regards,

罗曼.

推荐答案

对不起,目前无法实现.我已经提交了 github.com/logstash-plugins/logstash-output-rabbitmq错误#6 为您.

Sorry, this is currently not possible. I've filed github.com/logstash-plugins/logstash-output-rabbitmq bug #6 for you.

在解决该错误之前,也许您可​​以编写一个简单的微服务,该微服务使用无内容类型的消息,然后将其重新发布到另一个主题上,以正确的内容类型声明交换或排队.

Until that bug has been addressed, perhaps you can write a simple microservice that consumes the content-type-less messages and republishes them on another topic, exchange, or queue with the correct content type declare.

这篇关于如何使用Logstash&设置内容类型rabbitmq输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆