メッセージがAzureキューに入れられるたびにイベントが発生する、イベント駆動型のAzureキューを構築しようとしています。AzureXplorerを使用すると、メッセージはAzureキューに適切に配置されますが、CloudQueueClient.ResponseReceivedイベントは発生しません。AzureV1.4を使用しています。これは私のワーカーロールからのコードです:
public class WorkerRole : RoleEntryPoint
{
public override void Run()
{
while (true)
{
Thread.Sleep(10000);
}
}
public override bool OnStart()
{
// Set the maximum number of concurrent connections
ServicePointManager.DefaultConnectionLimit = 12;
var queuDataSource = new AzureQueueDataSource();
queuDataSource.GetCloudQueueClient().ResponseReceived +=new EventHandler<ResponseReceivedEventArgs>(WorkerRole_ResponseReceived);
// For information on handling configuration changes
// see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
return base.OnStart();
}
void WorkerRole_ResponseReceived(object sender, ResponseReceivedEventArgs e)
{
var i = 1; // Breakpoint here never happends
}
}