RabbitMQ:队列 -> 转发器 -> 流 – 如何正确配置以支持流消息格式

huangapple go评论93阅读模式
英文:

RabbitMQ: Queue -> Shovel -> Stream - How to correctly configure for Stream message format

问题

在一个服务器上,我想要一个队列(缓冲区),当连接到另一个服务器时,它应该将其消息传输到那里的。我想要使用Python客户端和流协议访问流,这意味着消息需要采用amqp 1.0格式(我知道这与RabbitMQ自己所述的amqp 1.0协议不同)。

我在我的本地机器上运行两个容器/ RabbitMQ 服务器。一个带有普通队列和一个Shovel,另一个带有一个流。两者都启用了amqp 1.0(和管理)。

我能够将队列与流连接起来,但只能使用两边都是amqp 0.9.1的方式。然而,以这种方式做不会将消息转换为我需要的amqp 1.0格式,我的Python客户端会抛出解码错误。
我还没有能够使用任何其他协议、URI等连接队列和流。

对于将数据上传到队列,我使用pika。要访问流,我使用rbfly。

我是否遗漏了什么,或者这是否不是直接可能的?

向所有人问候
Moe

英文:

On one server, I want a Queue (buffer) and when there is a connection to the other server, it should Shovel its messages to the Stream there. I want to access the Stream with a Python client and the Stream protocol, meaning the messages need to be in the amqp 1.0 format (I know that this is something different to the amqp 1.0 protocol, as stated by RabbitMQ themselves).

I am running two containers / RabbitMQ servers on my local machine. One with a normal Queue and a Shovel, the other one with a Stream. Both have amqp 1.0 (and management) enabled.

I am able to connect the Queue with the Stream but only with amqp 0.9.1 on both sides. Doing it this way does not convert the messages into the amqp 1.0 format that I need though and my Python client throws decoding errors.
I was not yet able to connect Queue and Stream with any other combination of protocols, uris, ...

For uploading the data to the Queue, I am using pika. For accessing the Stream, I am using rbfly.

Am I missing something or is this not directly possible?

Cheers to everyone
Moe

答案1

得分: 1

每个流客户端都需要实现 AMQP 1.0 消息格式解析器。

rstream 客户端支持 amqp 1.0 消息格式,并且与其他客户端兼容。

我们创建了一个 仓库 来混合所有客户端,以确保一切都如预期般运行。

英文:

For future readers:

Each stream client needs to implement the AMQP 1.0 message format parser.

The rstream client supports the amqp 1.0 message format and it is compatible with the other clients.

We created a repo to mix all the clients to ensure everything works as expected.

huangapple
  • 本文由 发表于 2023年7月13日 16:36:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/76677423.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定