英文:
In Apache ActiveMQ Artemis, how can I force Stomp messages to be text instead of binary?
问题
我们刚切换到了Apache ActiveMQ Artemis,启用了Stomp服务器用于JavaScript WebSocket订阅,一切都正常运行,但我们收到的消息是“某种程度上”的二进制数据。
帧被标记为isBinaryBody: true
,我还能看到一个伴随的binaryBody
属性。
我了解这是Apache ActiveMQ Artemis的默认行为,但是否有办法禁用/配置它,使其只处理文本消息?
英文:
We have just switched to Apache ActiveMQ Artemis, enabling the Stomp server for Javascript WebSocket subscriptions, and everything is working fine, but we're receiving messages as "kind of" binary data.
Frames are marked as isBinaryBody: true
and I can also spot a companion binaryBody
property.
I understand that this is the default behaviour in Apache ActiveMQ Artemis, but is there any way to disable/configure this and make it work with text only messages?
答案1
得分: 0
ActiveMQ Artemis目前是硬编码为二进制来编码WebSocket帧的。没有办法配置代理以不同的方式进行编码。不过,我已经打开了ARTEMIS-4294并发送/合并了用于此功能的PR。它将在2.29.0中可用,您可以在stomp
acceptor
上设置webSocketEncoderType=text
。
英文:
Currently ActiveMQ Artemis is hard-coded to encode WebSocket frames as binary. There is no way to configure the broker to do it differently. However, I have opened ARTEMIS-4294 and sent/merged a PR for this functionality. It will be available in 2.29.0, and you can set webSocketEncoderType=text
on the stomp
acceptor
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论