0
0
RabbitMQdevops~20 mins

RPC vs direct API calls in RabbitMQ - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
RPC Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding RPC vs Direct API Calls

Which statement best describes the main difference between RPC (Remote Procedure Call) over RabbitMQ and direct API calls?

ARPC and direct API calls are identical in communication style and protocol.
BRPC requires a web server, but direct API calls do not.
CDirect API calls always use message queues, but RPC uses HTTP protocols.
DRPC uses message queues to communicate asynchronously, while direct API calls are synchronous HTTP requests.
Attempts:
2 left
💡 Hint

Think about how messages are sent and received in each method.

💻 Command Output
intermediate
2:00remaining
Output of RPC Client Request in RabbitMQ

Given a RabbitMQ RPC client sends a request and waits for a response, what will be the output if the server replies with the message 'Success'?

RabbitMQ
client.send('request_data')
response = client.wait_for_response()
print(response)
ATimeoutError
BNone
CSuccess
Drequest_data
Attempts:
2 left
💡 Hint

The client waits for the server's reply message.

🔀 Workflow
advanced
2:30remaining
Correct RPC Workflow Sequence

What is the correct order of steps in a RabbitMQ RPC communication?

A1,2,3,4
B2,1,3,4
C1,3,2,4
D1,2,4,3
Attempts:
2 left
💡 Hint

Think about the message flow from client to server and back.

Troubleshoot
advanced
2:00remaining
Troubleshooting Missing RPC Response

A RabbitMQ RPC client sends a request but never receives a response. Which is the most likely cause?

AThe client is using HTTP instead of RabbitMQ.
BThe server is not consuming messages from the RPC queue.
CThe RabbitMQ server is down and no messages are sent.
DThe client did not send the request message.
Attempts:
2 left
💡 Hint

Consider what happens if the server does not process incoming requests.

Best Practice
expert
3:00remaining
Best Practice for Timeout Handling in RabbitMQ RPC

What is the best practice to handle timeouts in a RabbitMQ RPC client to avoid waiting forever for a response?

ASet a timeout on the client wait call and handle timeout exceptions gracefully.
BKeep retrying the request infinitely until a response arrives.
CIgnore timeouts and assume the server will always respond eventually.
DUse a blocking call without timeout to simplify code.
Attempts:
2 left
💡 Hint

Think about how to avoid hanging the client indefinitely.