0
0
RabbitMQdevops~20 mins

Why RPC enables request-reply over queues in RabbitMQ - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
RPC Queue Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does RPC use queues for request-reply?

In RabbitMQ RPC, how does the client receive the reply from the server?

AThe client sends requests to a shared queue and waits for the server to push replies to the same queue.
BThe client listens on a temporary reply queue and matches replies using a correlation ID.
CThe server sends replies directly to the client's IP address without using queues.
DThe client polls the request queue repeatedly to check for replies.
Attempts:
2 left
💡 Hint

Think about how the client knows which reply belongs to its request.

💻 Command Output
intermediate
2:00remaining
Identify the output of a RabbitMQ RPC client waiting for a reply

Given the following simplified Python RabbitMQ RPC client snippet, what will be printed?

RabbitMQ
import pika
import uuid

connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
channel = connection.channel()

result = channel.queue_declare(queue='', exclusive=True)
callback_queue = result.method.queue

corr_id = str(uuid.uuid4())

print(f"Waiting for reply with correlation ID: {corr_id}")
ARuntimeError because queue_declare is missing parameters
BSyntaxError due to missing parentheses in print
CWaiting for reply with correlation ID: <some-uuid-string>
DWaiting for reply with correlation ID: None
Attempts:
2 left
💡 Hint

Look at how the correlation ID is generated and printed.

Configuration
advanced
2:00remaining
Which RabbitMQ queue property is essential for RPC reply queues?

When setting up a reply queue for RPC in RabbitMQ, which queue property ensures the reply queue is deleted when the client disconnects?

Aauto_delete=false
Bdurable=true
Cpersistent=true
Dexclusive=true
Attempts:
2 left
💡 Hint

Think about a queue that only the client uses and should disappear after disconnect.

Troubleshoot
advanced
2:00remaining
Why does the RPC client never receive a reply?

An RPC client sends requests to a server queue but never receives replies. Which is the most likely cause?

AThe server does not set the reply_to property in the response message.
BThe client queue is declared with durable=true.
CThe client uses a fixed queue name for requests instead of a temporary queue.
DThe server uses the same correlation ID for all replies.
Attempts:
2 left
💡 Hint

Check how the server sends the reply back to the client.

🔀 Workflow
expert
3:00remaining
Order the steps in RabbitMQ RPC request-reply communication

Put the following steps in the correct order for a RabbitMQ RPC client-server interaction.

A1,2,3,4
B1,3,2,4
C2,1,3,4
D2,3,1,4
Attempts:
2 left
💡 Hint

Think about what the client must do before sending a request.