6.0.1 • Published 2 years ago

@prismamedia/amqp-client v6.0.1

Weekly downloads
82
License
MIT
Repository
github
Last release
2 years ago

AMQP Client

About

This module aims to ease the communication with a broker using the AMQP protocol, it provides some low-level tools.

Getting started

Prerequisites

This module requires Node 8.9 (the latest LTS) and a connection to an AMQP broker

Installation

import Client from '@prismamedia/amqp-client';
// or : Client = require('@prismamedia/amqp-client');

Configuration

const client = new Client('amqp://rabbitmq/');

Usage

const payload = { ... };

try {
  await client.publish('', 'queue_name', payload);
} catch (err) {
  // Handle error
}
try {
  const consumerId = await client.consume('queue_name', (message, payload, ack) => {
    // Do what you want with the full AMQP message or with the Object payload

    ack();
  });

  // [...]

  await client.stopConsumer(consumerId, true);
} catch (err) {
  // Handle error
}
6.0.1

2 years ago

6.0.0

3 years ago

5.1.7

4 years ago

5.1.6

4 years ago

5.1.5

4 years ago

5.1.4

4 years ago

5.1.3

4 years ago

5.1.2

4 years ago

5.1.1

4 years ago

5.1.0

4 years ago

5.0.0

4 years ago

5.0.0-beta.6

4 years ago

5.0.0-beta.5

4 years ago

5.0.0-beta.4

4 years ago

5.0.0-beta.3

4 years ago

5.0.0-beta.2

4 years ago

5.0.0-beta.1

4 years ago

5.0.0-beta.0

4 years ago

0.0.1

4 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.0.6

7 years ago

3.0.5

7 years ago

3.0.4

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago