Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

#364 Added Notes for producer config and also added in the example #366

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ For more information on configuring retries, see [Retry Topic Naming Strategies]
To use this module, create an `AsyncRetryHelper` object with the parameters that specify the retry delay, retry strategy, and number of retries, as in this example:

```typescript
//Note: The producer should already be connected to the Kafka cluster
import AsyncRetryHelper, { RetryTopicNaming } from "kafkajs-async-retry";

const asyncRetryHelper = new AsyncRetryHelper({
Expand Down Expand Up @@ -122,6 +123,8 @@ const kafka = new Kafka({
});

const producer = kafka.producer();
await producer.connect();

const consumer = kafka.consumer({ groupId: "test-group" });

const asyncRetryHelper = new AsyncRetryHelper({
Expand Down
Loading