Develop Message-Based Solutions Flashcards
When should you use Service Bus Queues?
- When you don’t want to poll the queue; Service Bus has a long-polling receive operation over TCP
- You require to process items in delivery order (FIFO)
- You need automatic de-duplication
- You want to process session messages as long-running streams
- You need transaction behaviour and atomicity when sending and receiving messages
- Your messages may be larger than 64kb (but less than 256kb)
When should you use Storage Queues?
- You need to have more than 8-GB of messages queued
- Your application wants to be responsible for tracking processed messages.
- You require server side logs of all transactions executed against your queues
What is a Service Bus Message?
A container decorated with metadata that contains data.
How can the data in Service Bus messages be encoded?
In any way.
What are the differences between Premium and Standard Service Bus tiers?
- Throughput: High / Variable
- Performance: Predictable / Variable Latency
- Pricing: Fixed / PAYG
- Scalability: Yes / No
- Maximum Message Size: 100MB / 256kb
What are the two modes you can use when receiving Service Bus messages?
Receive and Delete, and Peek Lock
How does Receive and Delete mode work?
- The Service Bus receives the consumer request
- It marks the message as consumed and returns it to the consumer
If the consumer crashes, the message is lost.
How does Peek Lock mode work?
The receive operation is two-stage.
- Find the next message and lock
- Return the message to the application - the application then requests Service Bus to complete the receive operation, marking the message as consumed
If the application is unable to process the message it can request the Service Bus abandon the process, Service Bus then unlocks the message.
If the application fails to process the message within the timeout, Service Bus unlocks the message.
What do Topics and Subscriptions allow?
Multiple consumers to process a single message
How do Topics and Subscriptions work?
A publisher sends a message to a topic; one or more subscribers to the topic receive the message.
Filter rules can further restrict the messages received by the subscriber.
Do consumers receive messages directly from the topic?
No. Consumers receiver messages from subscribers
What is the maximum size of a message in a Storage Queue?
64KB
What is the default TTL for a message in a Storage Queue?
7 days