hono icon indicating copy to clipboard operation
hono copied to clipboard

[Feature] Support RabbitMQ messaging

Open rpahli opened this issue 4 years ago • 15 comments

Hello guys,

I currently use hono in version 1.0 and have replaced the AMQP messaging infrastucture with rabbitMQ and AMQP 0.9.1. I currently work on migrating to the newest hono version and want to ask if you are intrested in the rabbitmq integration. If so I would be happy to prepare the PR for the integration.

rpahli avatar Feb 26 '21 15:02 rpahli

Hi, thanks a lot for the offer :-) I am no expert in AMQP 0.9.1, so I wonder if the north bound interface for clients is identical to the one for using AMQP 1.0?

sophokles73 avatar Mar 01 '21 07:03 sophokles73

Hello @sophokles73 ,

no both protocols are different on client and server and therefore incompatible.

rpahli avatar Mar 01 '21 08:03 rpahli

I see. I guess you needed to add a new Rabbit based implementation of the clients module's interfaces then in order for the protocol adapters to be able to connect to RabbitMQ, right?

sophokles73 avatar Mar 01 '21 08:03 sophokles73

Yes I started using the kafka adapters as a base. I already have a first working solution.

rpahli avatar Mar 01 '21 09:03 rpahli

You mean the code under clients/adapter-kafka? Do you also intend to support the Command & Control direction via RabbitMQ?

sophokles73 avatar Mar 01 '21 10:03 sophokles73

Yes that's the code. Yes the plan is to support also Command & Control. But I'll provide this in a separate PR.

rpahli avatar Mar 01 '21 12:03 rpahli

Ok, in general, I think we could support using RabbitMQ in the same (configurable) way that we now support AMQP 1.0 and Kafka, i.e. as a third option to be set on the tenant or by means of configuration of the downstream messaging. I am (currently) not aware of anybody else who wants to use RabbitMQ for this but that might simply be due to my ignorance ;-)

In any case, I believe that we can only add the code to the repository if there is some kind of commitment from your side to maintain that code in the foreseeable future in order to keep it up to date and in shape. If that is not possible for you, we could also think about adding the code to the hono-extras repository instead, which does not have the same requirements regarding code maturity and quality as our main repo does. WDYT?

@calohmn @dejanb @ctron @kaniyan any additional thoughts from your side?

sophokles73 avatar Mar 01 '21 13:03 sophokles73

Yes I'm able to maintain the code for the RabbitMQ part. So if the initial integration is finished you can add me as a maintainer for this part of the code. :-)

rpahli avatar Mar 01 '21 17:03 rpahli

Currently we support AMQP 1.0 and Kafka support is in progress. In the process to support Kafka, we have refactored our APIs to be protocol agnostic and also configurable at tenant level to choose protocols for downstream messaging, thereby providing more flexibility for Hono to support more messaging systems/protocols. Considering this, I find it good also to have AMQP 0.9.1 support in Hono.

I am not an expert in AMQP 0.9.1 and from what I read, it seems that AMQP 0.9.1 has more client implementations than AMQP 1.0. Also there is a Vert.x based RabbitMQ client and @rpahli I think you are already using it for your implementation.

kaniyan avatar Mar 02 '21 09:03 kaniyan

Also there is a Vert.x based RabbitMQ client and @rpahli I think you are already using it for your implementation.

Yes this is the client I'm using.

rpahli avatar Mar 02 '21 09:03 rpahli

Looks like we all agree.

@rpahli we look forward to your contribution :-)

sophokles73 avatar Mar 03 '21 14:03 sophokles73

@rpahli Please notice my PR #2525 where I tried to make the addition of a new messaging system easier.

b-abel avatar Mar 04 '21 14:03 b-abel

@rpahli is this still an issue, i.e. are you working on this or can we close this?

sophokles73 avatar Jun 13 '22 06:06 sophokles73

@sophokles73 Greetings! This is still an issue, but we had to postpone our work on it as we had other more pressing issues. We are currently evaluating whether it is possible to switch to AMQP1.0 in our infrastructure. Depending on the outcome we will either start working on this issue or it becomes obsolete.

mscheibler avatar Jun 13 '22 08:06 mscheibler

As you may have noticed, we have put the focus on using Kafka as the messaging infrastructure during the last year. Maybe that is an option for you as well?

sophokles73 avatar Jun 13 '22 08:06 sophokles73

@mscheibler @rpahli can we close this issue?

sophokles73 avatar Nov 30 '22 09:11 sophokles73

@sophokles73 we switched to kafka so I think you can close the issue for now.

rpahli avatar Nov 30 '22 10:11 rpahli