Courseiva
Event Driven IntegrationmediumMultiple ChoiceObjective-mapped

AI-200 Event Driven Integration Practice Question

You are writing a C# .NET console application that sends batch messages to an Azure Service Bus queue. To maximize performance and avoid exceeding payload size limits, how should you construct and send the batch?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use ServiceBusSender.CreateMessageBatchAsync() to dynamically package messages up to the maximum batch size limit.

Using `ServiceBusSender.CreateMessageBatchAsync()` allows you to safely add messages to a batch until the maximum size limit (e.g., 1 MB for Standard/Premium) is reached, preventing `ArgumentException` or payload size errors.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use individual SendMessageAsync calls inside a parallel Task.WhenAll loop.

    Why it's wrong here

    While parallel sends work, they generate high network overhead compared to proper batching.

  • Compress the entire list of messages into a single string and send it as an Event Grid webhook payload.

    Why it's wrong here

    Service Bus queues take ServiceBusMessage objects, not Event Grid webhooks.

  • Use ServiceBusSender.CreateMessageBatchAsync() to dynamically package messages up to the maximum batch size limit.

    Why this is correct

    CreateMessageBatchAsync creates a batch container that validates the size constraint as you add messages.

  • Add all 10,000 messages into a single List<ServiceBusMessage> and call SendMessagesAsync directly.

    Why it's wrong here

    Sending an unbounded list will exceed the broker's maximum payload size limit and throw an exception.

About these practice questions

One of 507 original AI-200 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official Microsoft exam blueprint

This AI-200 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-200 exam.