Skip to content

Commit ea07326

Browse files
committed
Adapt docs for kurrentdb
1 parent c3b3feb commit ea07326

File tree

9 files changed

+84
-82
lines changed

9 files changed

+84
-82
lines changed

docs/api/appending-events.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ order: 2
44

55
# Appending events
66

7-
When you start working with EventStoreDB, your application streams are empty. The first meaningful operation is to add one or more events to the database using this API.
7+
When you start working with KurrentDB, your application streams are empty. The first meaningful operation is to add one or more events to the database using this API.
88

99
::: tip
1010
Check the [Getting Started](getting-started.md) guide to learn how to configure and use the client SDK.
1111
:::
1212

1313
## Append your first event
1414

15-
The simplest way to append an event to EventStoreDB is to create an `EventData` object and call `appendToStream` method.
15+
The simplest way to append an event to KurrentDB is to create an `EventData` object and call `appendToStream` method.
1616

1717
```java {32-43}
1818
class OrderPlaced {
@@ -54,7 +54,7 @@ EventData eventData = EventData
5454
.build();
5555

5656
AppendToStreamOptions options = AppendToStreamOptions.get()
57-
.expectedRevision(ExpectedRevision.noStream());
57+
.streamState(StreamState.noStream());
5858

5959
client.appendToStream("orders", options, eventData)
6060
.get();
@@ -71,11 +71,11 @@ If you are new to Event Sourcing, please study the [Handling concurrency](#handl
7171

7272
## Working with EventData
7373

74-
Events appended to EventStoreDB must be wrapped in an `EventData` object. This allows you to specify the event's content, the type of event, and whether it's in JSON format. In its simplest form, you need three arguments: **eventId**, **eventType**, and **eventData**.
74+
Events appended to KurrentDB must be wrapped in an `EventData` object. This allows you to specify the event's content, the type of event, and whether it's in JSON format. In its simplest form, you need three arguments: **eventId**, **eventType**, and **eventData**.
7575

7676
### eventId
7777

78-
This takes the format of a `UUID` and is used to uniquely identify the event you are trying to append. If two events with the same `UUID` are appended to the same stream in quick succession, EventStoreDB will only append one of the events to the stream.
78+
This takes the format of a `UUID` and is used to uniquely identify the event you are trying to append. If two events with the same `UUID` are appended to the same stream in quick succession, KurrentDB will only append one of the events to the stream.
7979

8080
For example, the following code will only append a single event:
8181

@@ -88,7 +88,7 @@ EventData eventData = EventData
8888
.build();
8989

9090
AppendToStreamOptions options = AppendToStreamOptions.get()
91-
.expectedRevision(ExpectedRevision.any());
91+
.streamState(StreamState.any());
9292

9393
client.appendToStream("orders", options, eventData)
9494
.get();
@@ -106,19 +106,19 @@ It is common to see the explicit event code type name used as the type as it mak
106106

107107
### eventData
108108

109-
Representation of your event data. It is recommended that you store your events as JSON objects. This allows you to take advantage of all of EventStoreDB's functionality, such as projections. That said, you can save events using whatever format suits your workflow. Eventually, the data will be stored as encoded bytes.
109+
Representation of your event data. It is recommended that you store your events as JSON objects. This allows you to take advantage of all of KurrentDB's functionality, such as projections. That said, you can save events using whatever format suits your workflow. Eventually, the data will be stored as encoded bytes.
110110

111111
### userMetadata
112112

113-
Storing additional information alongside your event that is part of the event itself is standard practice. This can be correlation IDs, timestamps, access information, etc. EventStoreDB allows you to store a separate byte array containing this information to keep it separate.
113+
Storing additional information alongside your event that is part of the event itself is standard practice. This can be correlation IDs, timestamps, access information, etc. KurrentDB allows you to store a separate byte array containing this information to keep it separate.
114114

115115
### contentType
116116

117117
The content type indicates whether the event is stored as JSON or binary format. This is automatically set when using the builder methods like `builderAsJson()` or `builderAsBinary()`.
118118

119119
## Handling concurrency
120120

121-
When appending events to a stream, you can supply an *expected revision*. Your client uses this to inform EventStoreDB of the state or version you expect the stream to be in when appending an event. If the stream isn't in that state, an exception will be thrown.
121+
When appending events to a stream, you can supply a *stream state*. Your client uses this to inform KurrentDB of the state or version you expect the stream to be in when appending an event. If the stream isn't in that state, an exception will be thrown.
122122

123123
For example, if you try to append the same record twice, expecting both times that the stream doesn't exist, you will get an exception on the second:
124124

@@ -138,7 +138,7 @@ EventData eventDataTwo = EventData
138138
.build();
139139

140140
AppendToStreamOptions options = AppendToStreamOptions.get()
141-
.expectedRevision(ExpectedRevision.noStream());
141+
.streamState(StreamState.noStream());
142142

143143
client.appendToStream("no-stream-stream", options, eventDataOne)
144144
.get();
@@ -149,12 +149,14 @@ client.appendToStream("no-stream-stream", options, eventDataTwo)
149149
```
150150

151151
There are several available expected revision options:
152-
- `ExpectedRevision.any()` - No concurrency check
153-
- `ExpectedRevision.noStream()` - Stream should not exist
154-
- `ExpectedRevision.streamExists()` - Stream should exist
155-
- `ExpectedRevision.expectedRevision(long revision)` - Stream should be at specific revision
152+
- `StreamState.any()` - No concurrency check
153+
- `StreamState.noStream()` - Stream should not exist
154+
- `StreamState.streamExists()` - Stream should exist
155+
- `StreamState.streamRevision(long revision)` - Stream should be at specific revision
156156

157-
This check can be used to implement optimistic concurrency. When retrieving a stream from EventStoreDB, note the current version number. When you save it back, you can determine if somebody else has modified the record in the meantime.
157+
This check can be used to implement optimistic concurrency. When retrieving a
158+
stream from KurrentDB, note the current version number. When you save it back,
159+
you can determine if somebody else has modified the record in the meantime.
158160

159161
First, let's define the event classes for our ecommerce example:
160162

@@ -218,14 +220,14 @@ EventData orderCancelledEvent = EventData
218220

219221
// Process payment (succeeds)
220222
AppendToStreamOptions appendOptions = AppendToStreamOptions.get()
221-
.streamRevision(currentRevision);
223+
.streamState(currentRevision);
222224

223225
WriteResult paymentResult = client.appendToStream("order-12345", appendOptions, paymentProcessedEvent)
224226
.get();
225227

226228
// Cancel order (fails due to concurrency conflict)
227229
AppendToStreamOptions cancelOptions = AppendToStreamOptions.get()
228-
.streamRevision(currentRevision);
230+
.streamState(currentRevision);
229231

230232
client.appendToStream("order-12345", cancelOptions, orderCancelledEvent)
231233
.get();

docs/api/authentication.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ order: 7
44
head:
55
- - title
66
- {}
7-
- Authentication | Java | Clients | EventStore Docs
7+
- Authentication | Java | Clients | Kurrent Docs
88
---
99

1010
# Client x.509 certificate
@@ -15,7 +15,7 @@ X.509 certificates are digital certificates that use the X.509 public key infras
1515

1616
## Prerequisites
1717

18-
1. KurrentDB 25.0 or greater, or EventStoreDB 24.10 or later.
18+
1. KurrentDB 25.0 or greater, or KurrentDB 24.10 or later.
1919
2. A valid X.509 certificate configured on the Database. See [configuration steps](@server/security/user-authentication.html#user-x-509-certificates) for more details.
2020

2121
## Connect using an x.509 certificate
@@ -36,8 +36,8 @@ The client supports the following parameters:
3636
To authenticate, include these two parameters in your connection string or constructor when initializing the client:
3737

3838
```java
39-
EventStoreDBClientSettings settings = EventStoreDBConnectionString
40-
.parseOrThrow("esdb://admin:changeit@{endpoint}?tls=true&userCertFile={pathToCaFile}&userKeyFile={pathToKeyFile}");
39+
KurrentDBClientSettings settings = KurrentDBConnectionString
40+
.parseOrThrow("kurrentdb://admin:changeit@{endpoint}?tls=true&userCertFile={pathToCaFile}&userKeyFile={pathToKeyFile}");
4141

42-
EventStoreDBClient client = EventStoreDBClient.create(settings);
42+
KurrentDBClient client = KurrentDBClient.create(settings);
4343
```

docs/api/delete-stream.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ order: 9
33
head:
44
- - title
55
- {}
6-
- Deleting Events | Java | Clients | EventStore Docs
6+
- Deleting Events | Java | Clients | Kurrent Docs
77
---
88

99
# Deleting Events
1010

11-
In EventStoreDB, you can delete events and streams either partially or
11+
In KurrentDB, you can delete events and streams either partially or
1212
completely. Settings like $maxAge and $maxCount help control how long events are
1313
kept or how many events are stored in a stream, but they won't delete the entire
14-
stream. When you need to fully remove a stream, EventStoreDB offers two
14+
stream. When you need to fully remove a stream, KurrentDB offers two
1515
options: Soft Delete and Hard Delete.
1616

1717
## Soft delete
1818

19-
Soft delete in EventStoreDB allows you to mark a stream for deletion without
19+
Soft delete in KurrentDB allows you to mark a stream for deletion without
2020
completely removing it, so you can still add new events later. While you can do
2121
this through the UI, using code is often better for automating the process,
2222
handling many streams at once, or including custom rules. Code is especially
@@ -36,7 +36,7 @@ process. The stream can still be reopened by appending new events.
3636

3737
## Hard delete
3838

39-
Hard delete in EventStoreDB permanently removes a stream and its events. While
39+
Hard delete in KurrentDB permanently removes a stream and its events. While
4040
you can use the HTTP API, code is often better for automating the process,
4141
managing multiple streams, and ensuring precise control. Code is especially
4242
useful when you need to integrate hard delete into larger workflows or apply

docs/api/getting-started.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,77 +3,77 @@ order: 1
33
head:
44
- - title
55
- {}
6-
- Getting Started | Java | Clients | EventStoreDB Docs
6+
- Getting Started | Java | Clients | KurrentDB Docs
77
---
88

99
# Getting started
1010

11-
This guide will help you get started with EventStoreDB in your Java application.
12-
It covers the basic steps to connect to EventStoreDB, create events, append them
11+
This guide will help you get started with KurrentDB in your Java application.
12+
It covers the basic steps to connect to KurrentDB, create events, append them
1313
to streams, and read them back.
1414

1515
## Required packages
1616

17-
Add the `db-client-java` dependency to your project:
17+
Add the `kurrentdb-client` dependency to your project:
1818

1919
::: tabs
2020
@tab gradle
21-
```bash
22-
implementation 'com.eventstore:db-client-java:5.4.x'
21+
```groovy
22+
implementation 'io.kurrent:kurrentdb-client:1.0.x'
2323
```
2424
@tab maven
25-
```bash
25+
```xml
2626
<dependency>
27-
<groupId>com.eventstore</groupId>
28-
<artifactId>db-client-java</artifactId>
29-
<version>5.4.x</version>
27+
<groupId>io.kurrent</groupId>
28+
<artifactId>kurrentdb-client</artifactId>
29+
<version>1.0.x</version>
3030
</dependency>
3131
```
3232
:::
3333

34-
## Connecting to EventStoreDB
34+
## Connecting to KurrentDB
3535

36-
To connect your application to EventStoreDB, you need to configure and create a client instance.
36+
To connect your application to KurrentDB, you need to configure and create a client instance.
3737

3838
::: tip Insecure clusters
39-
The recommended way to connect to EventStoreDB is using secure mode (which is
40-
the default). However, if your EventStoreDB instance is running in insecure
39+
The recommended way to connect to KurrentDB is using secure mode (which is
40+
the default). However, if your KurrentDB instance is running in insecure
4141
mode, you must explicitly set `tls=false` in your [connection
4242
string](#connection-string) or client configuration.
4343
:::
4444

45-
EventStoreDB uses connection strings to configure the client connection. The connection string supports two protocols:
45+
KurrentDB uses connection strings to configure the client connection. The connection string supports two protocols:
4646

47-
- **`esdb://`** - for connecting directly to specific node endpoints (single node or multi-node cluster with explicit endpoints)
48-
- **`esdb+discover://`** - for connecting using cluster discovery via DNS or gossip endpoints
47+
- **`kurrentdb://`** - for connecting directly to specific node endpoints (single node or multi-node cluster with explicit endpoints)
48+
- **`kurrentdb+discover://`** - for connecting using cluster discovery via DNS or gossip endpoints
4949

50-
When using `esdb://`, you specify the exact endpoints to connect to. The client will connect directly to these endpoints. For multi-node clusters, you can specify multiple endpoints separated by commas, and the client will query each node's Gossip API to get cluster information, then picks a node based on the URI's node preference.
50+
When using `kurrentdb://`, you specify the exact endpoints to connect to. The client will connect directly to these endpoints. For multi-node clusters, you can specify multiple endpoints separated by commas, and the client will query each node's Gossip API to get cluster information, then picks a node based on the URI's node preference.
5151

52-
With `esdb+discover://`, the client uses cluster discovery to find available nodes. This is particularly useful when you have a DNS A record pointing to cluster nodes or when you want the client to automatically discover the cluster topology.
52+
With `kurrentdb+discover://`, the client uses cluster discovery to find available nodes. This is particularly useful when you have a DNS A record pointing to cluster nodes or when you want the client to automatically discover the cluster topology.
5353

5454
::: info Gossip support
55-
Since version 22.10, EventStoreDB supports gossip on single-node deployments, so
56-
`esdb+discover://` can be used for any topology, including single-node setups.
55+
Since version 22.10, KurrentDB supports gossip on single-node deployments, so
56+
`kurrentdb+discover://` can be used for any topology, including single-node setups.
5757
:::
5858

5959
For cluster connections using discovery, use the following format:
6060

6161
```
62-
esdb+discover://admin:[email protected]:2113
62+
kurrentdb+discover://admin:[email protected]:2113
6363
```
6464

6565
Where `cluster.dns.name` is a DNS `A` record that points to all cluster nodes.
6666

6767
For direct connections to specific endpoints, you can specify individual nodes:
6868

6969
```
70-
esdb://admin:[email protected]:2113,node2.dns.name:2113,node3.dns.name:2113
70+
kurrentdb://admin:[email protected]:2113,node2.dns.name:2113,node3.dns.name:2113
7171
```
7272

7373
Or for a single node:
7474

7575
```
76-
esdb://admin:changeit@localhost:2113
76+
kurrentdb://admin:changeit@localhost:2113
7777
```
7878

7979
There are a number of query parameters that can be used in the connection string to instruct the cluster how and where the connection should be established. All query parameters are optional.
@@ -96,22 +96,22 @@ There are a number of query parameters that can be used in the connection string
9696
| `dnsDiscover` | `true`, `false` | `false` | Enable DNS-based cluster discovery. When `true`, resolves hostnames to discover cluster nodes. Use with `feature=dns-lookup` for full DNS resolution. |
9797
| `feature` | `dns-lookup` | None | Enable specific client features. Use `dns-lookup` with `dnsDiscover=true` to resolve hostnames to multiple IP addresses for cluster discovery. |
9898

99-
When connecting to an insecure instance, specify `tls=false` parameter. For example, for a node running locally use `esdb://localhost:2113?tls=false`. Note that usernames and passwords aren't provided there because insecure deployments don't support authentication and authorisation.
99+
When connecting to an insecure instance, specify `tls=false` parameter. For example, for a node running locally use `kurrentdb://localhost:2113?tls=false`. Note that usernames and passwords aren't provided there because insecure deployments don't support authentication and authorisation.
100100

101101
## Creating a client
102102

103103
First, create a client and get it connected to the database.
104104

105105
```java
106-
EventStoreDBClientSettings settings = EventStoreDBConnectionString.parseOrThrow("esdb://localhost:2113?tls=false");
107-
EventStoreDBClient client = EventStoreDBClient.create(settings);
106+
KurrentDBClientSettings settings = KurrentDBConnectionString.parseOrThrow("kurrentdb://localhost:2113?tls=false");
107+
KurrentDBClient client = KurrentDBClient.create(settings);
108108
```
109109

110110
The client instance can be used as a singleton across the whole application. It doesn't need to open or close the connection.
111111

112112
## Creating an event
113113

114-
You can write anything to EventStoreDB as events. The client needs a byte array as the event payload. Normally, you'd use a serialized object, and it's up to you to choose the serialization method.
114+
You can write anything to KurrentDB as events. The client needs a byte array as the event payload. Normally, you'd use a serialized object, and it's up to you to choose the serialization method.
115115

116116
The code snippet below creates an event object instance, serializes it, and adds it as a payload to the `EventData` structure, which the client can then write to the database.
117117

docs/api/observability.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ order: 8
33
head:
44
- - title
55
- {}
6-
- Observability | Java | Clients | EventStore Docs
6+
- Observability | Java | Clients | Kurrent Docs
77
---
88

99
# Observability
@@ -97,10 +97,10 @@ public class EventStoreObservability {
9797
.setTracerProvider(sdkTracerProvider)
9898
.buildAndRegisterGlobal();
9999

100-
// Your EventStoreDB client operations will now be traced
101-
EventStoreDBClientSettings settings = EventStoreDBConnectionString
102-
.parseOrThrow("esdb://localhost:2113?tls=false");
103-
EventStoreDBClient client = EventStoreDBClient.create(settings);
100+
// Your KurrentDB client operations will now be traced
101+
KurrentDBClientSettings settings = KurrentDBConnectionString
102+
.parseOrThrow("kurrentdb://localhost:2113?tls=false");
103+
KurrentDBClient client = KurrentDBClient.create(settings);
104104
}
105105
}
106106
```
@@ -175,8 +175,8 @@ Each trace includes metadata to help with debugging and monitoring:
175175
| `db.eventstoredb.subscription.id` | Subscription identifier | `user-events-123-sub` |
176176
| `db.eventstoredb.event.id` | Event identifier | `event-456` |
177177
| `db.eventstoredb.event.type` | Event type identifier | `user.created` |
178-
| `server.address` | EventStoreDB server address | `localhost` |
179-
| `server.port` | EventStoreDB server port | `2113` |
178+
| `server.address` | KurrentDB server address | `localhost` |
179+
| `server.port` | KurrentDB server port | `2113` |
180180
| `exception.type` | Exception type if an error occurred | |
181181
| `exception.message` | Exception message if an error occurred | |
182182
| `exception.stacktrace` | Stack trace of the exception | |

0 commit comments

Comments
 (0)