Queue & Async Flashcards

(10 cards)

1
Q

What is a message queue?

A

A message queue is middleware that enables asynchronous communication between services. Producers send messages to a queue; consumers process them independently, decoupling services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the benefits of message queues?

A

Benefits include: asynchronous processing, load leveling, fault tolerance, scalability, service decoupling, and ability to handle traffic spikes without overloading services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the difference between a queue and a topic?

A

Queue: point-to-point communication, one consumer processes each message. Topic (pub/sub): broadcast communication, multiple subscribers receive each message.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Apache Kafka?

A

Kafka is a distributed streaming platform for building real-time data pipelines. It uses a publish-subscribe model with high throughput, durability, and message replay capability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is RabbitMQ?

A

RabbitMQ is a message broker implementing AMQP protocol. It supports multiple messaging patterns (queue, pub/sub, routing), offers reliability features, and has flexible routing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is message acknowledgment?

A

Acknowledgment confirms a message has been successfully processed. It ensures reliability: if consumer fails before acking, the message is redelivered to another consumer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is idempotency in message processing?

A

Idempotency means processing the same message multiple times produces the same result. It’s crucial for handling duplicate messages and ensuring system reliability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a dead letter queue?

A

A dead letter queue stores messages that couldn’t be processed after multiple attempts. It prevents message loss and allows investigation of problematic messages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is event-driven architecture?

A

Event-driven architecture uses events (state changes) to trigger and communicate between services. Services emit events when something happens; other services react by consuming events.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is backpressure?

A

Backpressure is a mechanism to handle situations where consumers can’t keep up with producers. It slows down producers or buffers messages to prevent system overload.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly