This test goal is to show the difference between synchronous and asynchronous interaction. For example, DB writes are slower on weaker hardware. As a result, the worker performs less useful work while waiting for a synchronous operation result.
As a bonus, an example of the implementation of the task on golang is given
- Add 100.000 messages into RabbitMQ, each message is a command (represented by a peak on chart start);
- Received command handler opens a PostgreSQL 11 transaction, inserts an entry into DB, publishes a message (event) into RabbitMQ and commits the transaction;
- Received event does not induce any load - it is just ACKed and log message.
- Intel i7 8700, 16gb DDR4, SSD
- All the logging is disabled;
- Every application has only 1 instance (single process);
- I haven't found how to change QoS settings in symfony/messenger so in both apps default ones are used;
- PostgreSQL 11 (500 connections limit);
- RabbitMQ 3.7.7;
- PHP 7.4;
- For php-service-bus/service-bus following PHP extensions were installed: raphf, pq, sockets, event, ext-buffer.
@see: Cooperative multitasking
The estimated execution time is indicated (considering the delay in updating the schedule).