I'm making some tests with Apache Kafka, RabbitMQ and Apache Pulsar, using C# client libraries. Tonight I started to do some tests with producer of messages for Apache Pulsar, and using the official .net library (DotPulsar) I see that the sending of messages is very slow compared to the other ones. It seems impossibile that Pulsar is so much slower than Kafka and RabbitMQ, I don't know if I am doing something wrong. I just wrote:
const string myTopic = "persistent://public/default/mytopic";
await using var client = PulsarClient.Builder()
.ServiceUrl(new Uri("pulsar://172.16.50.174:6650"))
.Build();
await using var producer = client.NewProducer()
.Topic(myTopic)
.Create();
for (int i = 0; i < 1000; i++) {
var ret = await producer.Send(UTF8Encoding.UTF8.GetBytes($"Hello World {i:00000}"));
}
It needs minutes go sent 10000 messages, I don't understand why. Consuming instead is very fast as expected. Can you help me on this?
Thank you