ある企業がAzure Service Busを使用してパブリッシュ/サブスクライブ(Pub/Sub)メッセージングコンポーネントを実装しています。あなたは最初のサブスクリプションアプリケーションを開発しています。 Azure ポータルでは、各トピックのメッセージがサブスクリプションに送信されていることが確認できます。正しい詳細情報を指定してサブスクリプション クライアント オブジェクトを作成して初期化しても、サブスクリプション アプリケーションはメッセージを消費しません。 購読クライアントがすべてのメッセージを処理することを確認する必要があります。 どのコードセグメントを使用すべきですか?
正解:D
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); Reference: https://www.c-sharpcorner.com/article/azure-service-bus-topic-and-subscription-pub-sub/