1.2.5 • Published 7 days ago

@restorecommerce/kafka-client v1.2.5

Weekly downloads
200
License
MIT
Repository
github
Last release
7 days ago

kafka-client

VersionBuild StatusDependenciesCoverage Status

A Node.js client for Apache Kafka based on kafka-node. Event messages structures are defined using Protocol Buffers with message encoding/decoding being achieved using protobufjs.

With this module, it is possible to have a fine grained control over which Kafka topics and event names the client can subscribe to. There could be multiple event names associated for the same message. Internally message events are emitted to local listeners using Node.js Events, which decode protobuf messages and execute the intended listeners.

This client includes a Provider object, which packages events and distributes them to the respective listeners. Currently, the following event providers are implemented:

  • Kafka
  • Local (in-process events, designed for testing)

When subscribing to a given event name, options can be passed. Currently, the supported subscription options are:

  • startingOffset - value for the starting offset to process messages; default is -1 (latest offset);
  • queue - a boolean flag; if set to true, messages are queued and processed synchronously;
  • forceOffset - a boolean flag; if set to true, startingOffset is considered above any other provided offset or configuration parameter.

Development

Tests

See tests. To execute the tests a set of backing services are needed. Refer to System repository to start the backing-services before running the tests.

  • To run tests
npm run test

Usage

  • Install dependencies
npm install
  • Build
# compile the code
npm run build
1.2.5

7 days ago

1.2.4

8 days ago

1.2.3

10 days ago

1.2.2

10 days ago

1.2.0

18 days ago

1.2.1

18 days ago

1.1.23

1 month ago

1.1.22

2 months ago

1.1.21

2 months ago

1.1.20

2 months ago

1.1.19

2 months ago

1.1.18

3 months ago

1.1.17

3 months ago

1.1.16

4 months ago

1.1.15

4 months ago

1.1.13

5 months ago

1.0.18

9 months ago

1.0.17

9 months ago

1.0.16

10 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.1.9

5 months ago

1.1.8

6 months ago

1.1.7

6 months ago

1.1.6

6 months ago

1.1.5

6 months ago

1.1.4

7 months ago

1.1.3

7 months ago

1.1.2

7 months ago

1.1.12

5 months ago

1.1.11

5 months ago

1.1.10

5 months ago

1.0.15

10 months ago

1.0.14

10 months ago

1.0.13

10 months ago

1.0.12

10 months ago

1.0.11

10 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

12 months ago

1.0.10

11 months ago

1.0.2

2 years ago

1.0.5

1 year ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.4.4

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.2

2 years ago

0.3.0

2 years ago

0.3.1

2 years ago

0.2.27

2 years ago

0.2.26

2 years ago

0.2.25

2 years ago

0.2.29

2 years ago

0.2.28

2 years ago

0.2.23

3 years ago

0.2.22

3 years ago

0.2.21

3 years ago

0.2.19

3 years ago

0.2.18

3 years ago

0.2.17

3 years ago

0.2.15

3 years ago

0.2.13

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.7

3 years ago

0.2.8

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.4

3 years ago

0.1.13

3 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

6 years ago