Skip to content

Commit f99e5a0

Browse files
readme fixes
1 parent 6cc6ea6 commit f99e5a0

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

README.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,6 @@ public class KafkaConfig {
119119
### Pekko/Akka Kafka Applications
120120
Pekko and Akka Kafka applications typically use immutable configuration maps internally, which prevents Superstream from applying optimizations. To enable Superstream optimizations with Pekko/Akka, you need to create the KafkaProducer manually with a mutable configuration.
121121

122-
**Native Pekko/Akka pattern (optimizations won't be applied)**:
123-
```java
124-
ProducerSettings<String, String> producerSettings = ProducerSettings
125-
.create(system, new StringSerializer(), new StringSerializer())
126-
.withBootstrapServers("localhost:9092");
127-
128-
Source.single(ProducerMessage.single(record))
129-
.via(Producer.flexiFlow(producerSettings))
130-
.runWith(Sink.ignore, system);
131-
```
132-
133122
**Superstream-optimized pattern**:
134123
```java
135124
// Add these lines to create a mutable producer
@@ -149,9 +138,16 @@ Source.single(ProducerMessage.single(record))
149138
.runWith(Sink.ignore, system);
150139
```
151140

152-
This approach ensures that:
153-
- All Pekko/Akka Kafka features remain available
154-
- Superstream can optimize the producer configuration
141+
**Native Pekko/Akka pattern (optimizations won't be applied)**:
142+
```java
143+
ProducerSettings<String, String> producerSettings = ProducerSettings
144+
.create(system, new StringSerializer(), new StringSerializer())
145+
.withBootstrapServers("localhost:9092");
146+
147+
Source.single(ProducerMessage.single(record))
148+
.via(Producer.flexiFlow(producerSettings))
149+
.runWith(Sink.ignore, system);
150+
```
155151

156152
### Why This Matters
157153
The Superstream library needs to modify your producer's configuration to apply optimizations based on your cluster's characteristics. This includes adjusting settings like compression, batch size, and other performance parameters. When the configuration is immutable, these optimizations cannot be applied.

0 commit comments

Comments
 (0)