Are projections supported in embedded mode? When I run a projection in embedded node (doesn’t matter if its single or a cluster node) the projection gets into a faulted state with this error:
Could not find a part of the path ‘E:\Projects\ESEmbedded\bin\Debug\Prelude\1Prelude.js’
Code running embedded single node:
var node = EmbeddedVNodeBuilder.AsSingleNode()
.RunProjections(ProjectionsMode.All)
.WithInternalTcpOn(new IPEndPoint(IPAddress.Loopback, 1112))
.WithExternalHttpOn(new IPEndPoint(IPAddress.Loopback, 1113))
.WithInternalHttpOn(new IPEndPoint(IPAddress.Loopback, 2112))
.WithExternalHttpOn(new IPEndPoint(IPAddress.Loopback, 2114))
.AddHttpPrefix(“http://+:2114/”)
.Build();
node.Start();
Sample projection:
var mgr = new ProjectionsManager(new ConsoleLogger(), new IPEndPoint(IPAddress.Loopback, 2114), TimeSpan.FromSeconds(1));
var projection = @"
fromAny().when({
TestEvent: function(state, event) {
linkTo(‘stream-’ + event.data.stream, event);
}
})
";
mgr.CreateContinuousAsync(“TestProjection”, projection, credentials).Wait();
mgr.ListAllAsync().Result
Cheers,
Ritesh.