fix
This commit is contained in:
parent
07a0377cbb
commit
6bcfec3c0f
@ -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()
|
||||
|
@ -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:
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
Результат отработки Consumer_2:
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
Вывод: Consumer_2 нагружает меньше памяти, чем Consumer_1 и принимает сообщения гораздо быстрее, тем самым не позволяя очереди накапливать огромное количество сообщений.
|
BIN
tasks/zinoveva-ad/lab_4/pic/Screenshot_16.jpg
Normal file
BIN
tasks/zinoveva-ad/lab_4/pic/Screenshot_16.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 67 KiB |
BIN
tasks/zinoveva-ad/lab_4/pic/Screenshot_17.jpg
Normal file
BIN
tasks/zinoveva-ad/lab_4/pic/Screenshot_17.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
Loading…
x
Reference in New Issue
Block a user