Here are some recommendations in the light of the performance and throughput results:
- If we send many events: always reuse connections, i.e. do not create a connection only for one event. This is valid for both AMQP and HTTP. A simple Connection Pool pattern makes this easy.
- If we send many events & throughput is a concern: use AMQP.
- If we send few events and latency is a concern: use HTTP / REST.
- If events naturally comes in batch of many events: use batch API.
- If events do not naturally comes in batch of many events: simply stream events. Do not try to batch them unless network IO is constrained.
- If a latency of 0.1 seconds is a concern: move the call to Event Hubs away from your critical performance path.
Let’s now look at the tests we did to come up with those recommendations.
Read the whole thing.