main #3

Merged
Hlop4ik4 merged 237 commits from v.moiseev/distributed-computing:main into main 2024-01-06 17:16:53 +04:00
4 changed files with 4 additions and 4 deletions
Showing only changes of commit 6bcfec3c0f - Show all commits

View File

@ -2,7 +2,7 @@ import pika
import time
import random
collection = ["Application for general business expenses", "The contract is completed", "Enrollment order completed", "Student enrolled"]
collection = ["the employment document", "The document is agreed", "Signatures are provided", "the employee is accepted"]
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
channel = connection.channel()

View File

@ -37,7 +37,7 @@ import pika
import time
import random
collection = ["Application for accommodation in a dormitory", "Rector's order", "Conclusion of an agreement", "Check-into a dormitory"]
collection = ["the employment document", "The document is agreed", "Signatures are provided", "the employee is accepted"]
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
channel = connection.channel()
@ -107,12 +107,12 @@ channel.start_consuming()
Результат отработки Consumer_1:
![](pic/Screenshot_12.jpg)
![](pic/Screenshot_16.jpg)
![](pic/Screenshot_13.jpg)
Результат отработки Consumer_2:
![](pic/Screenshot_14.jpg)
![](pic/Screenshot_17.jpg)
![](pic/Screenshot_15.jpg)
Вывод: Consumer_2 нагружает меньше памяти, чем Consumer_1 и принимает сообщения гораздо быстрее, тем самым не позволяя очереди накапливать огромное количество сообщений.

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB