Kafka, RabbitMQ and Pulsar measured side by side on ordering, replay and consumer scaling by driving the three client libraries directly, plus an operational-footprint measurement of each broker's own distribution. Nine tests, three brokers started without Docker, and every number in the documentation regenerated by scripts/run-all.sh.
24 lines
711 B
Java
24 lines
711 B
Java
package com.ankurm.brokers;
|
|
|
|
import java.io.IOException;
|
|
import java.nio.file.Files;
|
|
import java.nio.file.Path;
|
|
|
|
/** Writes a transcript under docs/output/. Nothing in the article is typed by hand. */
|
|
public final class Capture {
|
|
|
|
private Capture() {
|
|
}
|
|
|
|
public static void write(String fileName, String heading, String body) {
|
|
Path dir = Path.of(System.getProperty("user.dir"), "docs", "output");
|
|
try {
|
|
Files.createDirectories(dir);
|
|
Files.writeString(dir.resolve(fileName), "== " + heading + " ==\n\n" + body + "\n");
|
|
}
|
|
catch (IOException ex) {
|
|
throw new IllegalStateException("could not write " + fileName, ex);
|
|
}
|
|
}
|
|
}
|