Complete the code to set a message TTL of 60000 milliseconds in a queue declaration.
channel.queue_declare(queue='task_queue', arguments=[1])
x-expires instead of x-message-ttl sets queue expiration, not message TTL.x-max-length with TTL; it limits queue size, not message lifetime.The x-message-ttl argument sets the TTL for messages in the queue in milliseconds.
Complete the code to publish a message with a TTL of 30000 milliseconds.
channel.basic_publish(exchange='', routing_key='task_queue', body='Hello', properties=pika.BasicProperties(expiration=[1]))
The expiration property expects a string representing milliseconds as text.
Fix the error in the queue declaration to correctly set message TTL to 45000 milliseconds.
channel.queue_declare(queue='logs', arguments=[1])
The x-message-ttl value must be an integer representing milliseconds, not a string.
Fill both blanks to declare a queue with message TTL of 20000 ms and dead-letter exchange named 'dlx'.
channel.queue_declare(queue='orders', arguments=[1])
Both x-message-ttl and x-dead-letter-exchange must be set together in the arguments dictionary.
Fill all three blanks to publish a persistent message with TTL 15000 ms to exchange 'logs' with routing key 'info'.
channel.basic_publish(exchange=[1], routing_key=[2], body='Log entry', properties=pika.BasicProperties(delivery_mode=[3], expiration='15000'))
The exchange is 'logs', routing key is 'info', and delivery_mode 2 makes the message persistent.