0

オースティンサンプルをベースにしたサンプルアプリケーションを作成しようとしています。最初にサンプルで404を入手し、App.ConfigでconnectionStringを調整して修正しました(これを忘れてしまいました。悪いです)。これで、AzureテーブルではなくServiceBusキューにメッセージを送信する2番目のシンクを作成しました。SampleApplicationとEventSourceSimulatorを起動すると、最初の2つのメッセージは正しく通過したように見えますが、3番目のメッセージは404エラーを示しています。以下は、エラーと私のシンクのクラスのスクリーンショットです。私を助けるためにもっと情報が必要な場合は、教えてください。前もって感謝します、

オースティン404エラー

public class ServiceBusQueueSink<TEvent>
{
    readonly QueueClient _queueClient;
    readonly NamespaceManager _namespaceManager;
    readonly string _connectionString;
    readonly string _queueName = "DeviceErrorsQueue";
    readonly string _errorType;
    readonly bool _storeCtis;

    ServiceBusQueueSink(string errorType, bool storeCtis)
    {
        _errorType = errorType;
        _storeCtis = storeCtis;

        // Configure Queue Settings
        QueueDescription qd = new QueueDescription(_queueName);
        qd.MaxSizeInMegabytes = 2048;
        qd.DefaultMessageTimeToLive = new TimeSpan(0, 1, 0);

        // Create the queue if it does not exist already
        _connectionstring =  CloudConfigurationManager.GetSetting("Microsoft.ServiceBus.ConnectionString");

        _namespaceManager = NamespaceManager.CreateFromConnectionString(_connectionString);

        if (!_namespaceManager.QueueExists(_queueName))
        {
            _namespaceManager.CreateQueue(_queueName);
        }

        _queueClient = QueueClient.CreateFromConnectionString(_connectionString, "DeviceErrorsQueue");

    }

    /// <summary>
    /// Write each received event into the service bus queue.
    /// </summary>
    /// <param name="e">Event to write.</param>
    public void OnNext(PointEvent<TEvent> e)
    {
        bool send = false;
        if (e.EventKind == EventKind.Cti)
        {
            if (_storeCtis)
                send = true;
            else
                send = false;
        }
        else
            send = true;

        if (send)
        {
            BrokeredMessage message = new BrokeredMessage(e);
            message.Properties["ErrorType"] = _errorType;
            _queueClient.Send(message);
        }
    }

    /// <summary>
    /// Static method that returns a new Service Bus Queue sink observer.
    /// </summary>
    /// <param name="storageConnection">Service Bus Queue connection string.</param>
    /// <param name="errorType">Type of error to be saved in properties of brokeredmessage.</param>
    /// <param name="storeCtis">Flag specifying whether to also persist CTI events.</param>
    /// <returns></returns>
    public static IObserver<PointEvent<TEvent>> CreateObserver(string errorType, bool storeCtis)
    {
        var res = new ServiceBusQueueSink<TEvent>(errorType, storeCtis);
        return Observer.Create<PointEvent<TEvent>>(e => res.OnNext(e));
    }

更新:管理ポータルのService Busキューに何も表示されないため、何も表示されないと思います。

4

2 に答える 2

1

(yourservice)/ devicesにHttpSourceがあると思いますよね?問題は、2つのメッセージを受信した後、クエリで何かが壊れた後、出力シンクが疑われることです。そのため、クエリ全体がシャットダウンされたため、このアドレスで404を受け取ります。StreamInsightストレージアカウントのログテーブルを確認してください。エラー/例外情報が表示されます。

于 2012-11-19T10:18:04.383 に答える
0

問題の理由を見つけたようです。一般に、HTTPエンドポイントが404を返す場合(おそらくいくつかのリクエストが成功した後)、上記の最初の応答が示すように、クエリパイプラインの何かが爆発した可能性があります。その場合、デバッガーを接続してクエリの診断を調べることで、スローされた例外を取得できます。Austin CTPパッケージ(入門ドキュメントの一部)に付属するFAQには、その詳細が記載されています。

于 2012-11-19T18:06:41.377 に答える