Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stable Node JS AMQP 1.0 Client (Event Hub)

I'm looking for a stable AMQP 1.0 client for NodeJS so that I can consume events from Azure Event Hubs.

I have tried using https://github.com/noodlefrenzy/node-amqp10, but it chokes sporadically on certain payloads with messages like malformed payload: Unknown code prefix: 0x30 and malformed payload: Unable to decode bytes from message body: 005375b00002810c5b7b226576656e7474797065223 (...).

I would appreciate any direction people can offer for a stable AMQP 1.0 client in NodeJS. I am surprised that I have not been able to find one so far, since otherwise it seems Azure is failing to support an entire developer base.

like image 636
Ian Walker-Sperber Avatar asked Mar 14 '23 09:03

Ian Walker-Sperber


2 Answers

I'm the (co-)author of https://github.com/noodlefrenzy/node-amqp10. The error you were seeing was due to large messages being split across multiple transfer frames - something we hadn't encountered before, so hadn't implemented. We just added support for this in v2.1.0, so please check out our library again.

My co-author uses this in production against QPID and has been for months, and we both actively support it as we have time, so if there are any instabilities or missing features, we will try our best to address them. Often they are just issues where we haven't needed a feature of the (incredibly large) spec or have misinterpreted the (incredibly scattered) spec details.

like image 93
Mike Lanzetta Avatar answered Mar 23 '23 16:03

Mike Lanzetta


You can also use the official JavaScript SDK for Azure Event Hubs, @azure/event-hubs which internally uses rhea

like image 22
Ramya Rao Avatar answered Mar 23 '23 16:03

Ramya Rao