I have been struggling to get the starter example provided to work, or even connect. It is an extremely simple setup, and I can connect and do everything I need to with python with no issues. As such, I don’t think the eventstoredb datastore is the issue. Below is the code block that compiles, but throws a connection closed exception. I even ran strace (this is on Linux), and I don’t see a connect() call anywhere. I don’t even see a reference to any usage of port 2113. The client is 4.1.1
public class EventStoreTest {
public static void main (String args[]) throws Exception {
EventStoreDBClientSettings settings = EventStoreDBConnectionString.parse(“esdb://localhost:2113?tls=false”);
EventStoreDBClient client = EventStoreDBClient.create(settings);
ReadStreamOptions options = ReadStreamOptions.get().forwards().fromStart().maxCount(5);
ReadResult result = client.readStream(“account-1”, options).get();
}
}