camaleon-rabbitmq
camaleon-rabbitmq
is a RabbitMQ abstraction written in TypeScript.
Installing
You can install camaleon-rabbitmq
with npm:
npm install camaleon-rabbitmq
Using
Camaleon RabbitMQ gives you two basic Pub/Sub functionalities: Producers and Subscribers.
Producers
;; const brokerAddress = processenvBROKER_ADDRESS || 'amqp://guest:guest@localhost:5672';const producer: IProducer = brokerAddress;const exchangeName = 'example-message'; const message = ;producerproduce<ExampleMessage>exchangeName message;
You can find more examples of producers at this repository.
Subscribers
;;; const brokerAddress = processenvBROKER_ADDRESS || 'amqp://guest:guest@localhost:5672';const exchangeName = 'example-message';const broker = brokerAddress exchangeName ; broker;
You can find more examples of subscribers at this repository.