Skip to content

Commit

Permalink
api word off
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Jul 1, 2023
1 parent 7cf9d9c commit 73d438c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dependencies {
}
```

## Messages API
## Messages
To create Kafka Message with **Topic**, **Key** and **Value**:
```java
final Message<String, String> msg = new Tkv<>("test.topic", "test-k", "test-v");
Expand Down Expand Up @@ -98,7 +98,7 @@ final Message<String, String> msg =
);
```

## Producer API
## Producers
To create Kafka Producer you can wrap original [KafkaProducer](https://kafka.apache.org/23/javadoc/index.html?org/apache/kafka/clients/producer/KafkaProducer.html):
```java
final KafkaProducer origin = ...;
Expand Down Expand Up @@ -174,7 +174,7 @@ final Producer<String, String> producer =
);
```

## Consumer API
## Consumers
To create Kafka Consumer you can wrap original [KafkaConsumer](https://kafka.apache.org/23/javadoc/index.html?org/apache/kafka/clients/consumer/KafkaConsumer.html):
```java
final KafkaConsumer origin = ...;
Expand Down Expand Up @@ -259,7 +259,7 @@ Finally, you can `unsubscribe`:
consumer.unsubscribe();
```

## Fake API
## Fakes

In case of mocking eo-kafka, you can use existing Fake Objects from `io.github.eocqrs.kafka.fake` package.
They look like a normal ones, but instead of talking to real Kafka broker,
Expand Down Expand Up @@ -326,7 +326,7 @@ final Consumer<Object, String> consumer =
);
```

### Fake API Example
### Example with Fakes

```java
final String topic = "test";
Expand Down

0 comments on commit 73d438c

Please sign in to comment.