4.0.0 C#クライアントAPI(EventStore.ClientAPI.dll)を使用してGetEventStoreバージョン3.2.2に接続しようとしています。私はLINQPad 5のサンプルとしてこれを書いていますので、何がうまくいかないのか理解することができます。 C#ステートメントのLINQPadクエリが設定されています。これまでに私が書いたユーザクエリがあります。クライアントの識別を待ってタイムアウトしました(ReadStreamEventsForwardAsync)
var localHostAddressses = Dns.GetHostAddresses(Dns.GetHostName());
var localAddress = localHostAddressses.FirstOrDefault(ha => ha.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) ?? IPAddress.Loopback;
var endPoint = new IPEndPoint(localAddress, 1113);
var userCredentials = new EventStore.ClientAPI.SystemData.UserCredentials("admin", "changeit");
var settings = EventStore.ClientAPI.ConnectionSettings.Create();
settings.SetDefaultUserCredentials(userCredentials);
settings.UseConsoleLogger();
settings.WithConnectionTimeoutOf(TimeSpan.FromSeconds(2));
settings.LimitReconnectionsTo(1);
settings.SetOperationTimeoutTo(TimeSpan.FromSeconds(2));
using (var client = EventStore.ClientAPI.EventStoreConnection.Create(settings, endPoint))
{
client.ConnectAsync().Wait();
var streamName = "SpecialStreamName42";
var task = client.ReadStreamEventsForwardAsync(streamName, 0, 10, false);
task.Wait();
task.Result.Dump();
}
それは)次の出力
[19,14:05:27.126,DEBUG] TcpPackageConnection: connected to [192.168.15.201:1113, L192.168.15.201:28239, {c4f69c94-254f-475c-883a-06e427fd4610}].
[08,14:05:29.176,INFO] ClientAPI TcpConnection closed [14:05:29.176: N192.168.15.201:1113, L192.168.15.201:28239, {c4f69c94-254f-475c-883a-06e427fd4610}]:
[08,14:05:29.176,INFO] Received bytes: 116, Sent bytes: 124
[08,14:05:29.176,INFO] Send calls: 3, callbacks: 3
[08,14:05:29.176,INFO] Receive calls: 4, callbacks: 3
[08,14:05:29.176,INFO] Close reason: [Success] Timed out waiting for client to be identified
[08,14:05:29.176,DEBUG] TcpPackageConnection: connection [192.168.15.201:1113, L192.168.15.201:28239, {c4f69c94-254f-475c-883a-06e427fd4610}] was closed cleanly.
[11,14:05:29.377,DEBUG] TcpPackageConnection: connected to [192.168.15.201:1113, L192.168.15.201:28240, {9373790b-6f43-4d3f-bf66-77325b529bd0}].
[19,14:05:31.427,INFO] ClientAPI TcpConnection closed [14:05:31.427: N192.168.15.201:1113, L192.168.15.201:28240, {9373790b-6f43-4d3f-bf66-77325b529bd0}]:
[19,14:05:31.427,INFO] Received bytes: 116, Sent bytes: 124
[19,14:05:31.427,INFO] Send calls: 3, callbacks: 3
[19,14:05:31.427,INFO] Receive calls: 4, callbacks: 3
[19,14:05:31.427,INFO] Close reason: [Success] Timed out waiting for client to be identified
[19,14:05:31.427,DEBUG] TcpPackageConnection: connection [192.168.15.201:1113, L192.168.15.201:28240, {9373790b-6f43-4d3f-bf66-77325b529bd0}] was closed cleanly.
マイtask.Waitを(生産。は19行目で完了せず、最終的に1つ以上のエラーが発生したAggregateExceptionで終了します。内部例外は "Connection 'ES-7a7e3dfb-db11-4a5c-872c-100ad7724ba2'が閉じられました。"私は見た例を守っていますし、私は見通しを立てていないようです。うまくいけば、これは私がクライアントに通知することができるように設定していないばかげた何かです。アイデアがあればお知らせください。
接続が、私は「状態の特定」[GoToIdentifyState](https://github.com/EventStore/EventStore/blob/56c5680f51325cf0e99846da72ae313402c63c2d/src/EventStore.ClientAPI/Internal/EventStoreConnectionLogicHandler.cs)ライン271に行きます私のクライアントをサーバーに "識別"する方法はまだ失われていますが、うまくいけば、これは他の人にとってより意味をなさないでしょう。 –
更なるアップデート。クライアントバージョン3.3.1〜3.9.4を使用すると、期待どおりに接続されます。 –
4.0.0クライアントはES 3.9.4以降と互換性があります。クライアント3.9.5は双方向に互換性があります。 –