Closed ennru closed 5 years ago
For Alpakka Kafka 2.0 we should simply change the default parallelism to something significantly higher.
The new default parallelism is now 10,000 with #944. This shows quite an improvement for our benchmarks even for transactional use.
Short description
To max out producing to Kafka until the Kafka producer API blocks, we can increase the parallelism a lot and let the designated
akka.kafka.default-dispatcher
take the blocking.Details
From Kafka's API docs
By increasing the producer parallelism (current default 100) to a quite large value, Alpakka Kafka would not normally backpressure for uncompleted sends, but the
producer.send
would start blocking. For that blocking to be taken care of, the stage runs on the designated dispatcherakka.kafka.default-dispatcher
.