Reputation: 762
trying out eventstoredb and unable to do the most basic thing. is it broken? the issue is that the client.appendToStream() is blocking and never returns.
started code up with
docker run --name esdb-node -it -p 2113:2113 -p 1113:1113 eventstore/eventstore:latest --insecure --run-projections=All --enable-atom-pub-over-http
then the maven dependency of
<dependency>
<groupId>com.eventstore</groupId>
<artifactId>db-client-java</artifactId>
<version>5.3.1</version>
</dependency>
sample code
EventStoreDBClientSettings setts =
EventStoreDBConnectionString.parseOrThrow("esdb://localhost:2113?tls=false&tlsVerifyCert=false");
EventStoreDBClient client = EventStoreDBClient.create(setts);
AccountCreated event = new AccountCreated();
JsonMapper jsonMapper = new JsonMapper();
event.setId(UUID.randomUUID().toString());
event.setLogin("test");
EventData eventData = EventData
.builderAsJson("AccountCreated", jsonMapper.writeValueAsBytes(event))
.build();
client.appendToStream("some-stream", eventData)
.get();
System.out.println("This never happens");
--EDIT--
downgrade maven dependency to 5.2.0 and its working
Upvotes: 1
Views: 41
Reputation: 1
This was a bug affecting Maven projects depending on version 5.3.1
of the Java Client.
A patch has been applied to fix the issue in version 5.3.2
, more information on the bug is available here: https://github.com/EventStore/EventStoreDB-Client-Java/issues/267.
Upvotes: 0