AZ-204 · Question #348
A company is implementing a publish-subscribe (Pub/Sub) messaging component by using Azure Service Bus. You are developing the first subscription application. In the Azure portal you see that…
The correct answer is D. subscriptionClient.RegisterMessageHandler(ProcessMessageAsync, messageHandlerOptions). Using topic client, call RegisterMessageHandler which is used to receive messages continuously from the entity. It registers a message handler and begins a new thread to receive messages. This handler is waited on every time a new message is received by the receiver…
Question
Options
- Aawait subscriptionClient.AddRuleAsync(new RuleDescription(RuleDescription.DefaultRuleName,
- BsubscriptionClient = new SubscriptionClient(ServiceBusConnectionString, TopicName,
- Cawait subscriptionClient.CloseAsync();
- DsubscriptionClient.RegisterMessageHandler(ProcessMessageAsync, messageHandlerOptions);
How the community answered
(54 responses)- A2% (1)
- B7% (4)
- C11% (6)
- D80% (43)
Explanation
Using topic client, call RegisterMessageHandler which is used to receive messages continuously from the entity. It registers a message handler and begins a new thread to receive messages. This handler is waited on every time a new message is received by the receiver. subscriptionClient.RegisterMessageHandler(ReceiveMessagesAsync, messageHandlerOptions);
Topics
Community Discussion
No community discussion yet for this question.