Skip to content

Commit aef09aa

Browse files
committed
Update docs to use KurrentDB
1 parent fe62fcc commit aef09aa

File tree

9 files changed

+67
-67
lines changed

9 files changed

+67
-67
lines changed

docs/api/appending-events.md

Lines changed: 11 additions & 11 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
```ts {32-43}
1818
import { v4 as uuid } from "uuid";
@@ -29,7 +29,7 @@ const event = jsonEvent({
2929
});
3030

3131
await client.appendToStream("orders", event, {
32-
expectedRevision: NO_STREAM,
32+
streamState NO_STREAM,
3333
});
3434
```
3535

@@ -43,11 +43,11 @@ If you are new to Event Sourcing, please study the [Handling concurrency](#handl
4343

4444
## Working with EventData
4545

46-
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**.
46+
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**.
4747

4848
### eventId
4949

50-
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.
50+
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.
5151

5252
For example, the following code will only append a single event:
5353

@@ -77,19 +77,19 @@ It is common to see the explicit event code type name used as the type as it mak
7777

7878
### eventData
7979

80-
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.
80+
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.
8181

8282
### userMetadata
8383

84-
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.
84+
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.
8585

8686
### contentType
8787

8888
The content type indicates whether the event is stored as JSON or binary format. You can use existing methods `jsonEvent` or `binaryEvent` to create the `EventData` object, which will set the content type accordingly.
8989

9090
## Handling concurrency
9191

92-
When appending events to a stream, you can supply a *stream state*. 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.
92+
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.
9393

9494
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:
9595

@@ -133,7 +133,7 @@ There are several available expected revision options:
133133
- `bigint` - Stream should be at specific revision
134134

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

139139
```ts {6,9,26-28,41-43}
@@ -163,7 +163,7 @@ const orderPlacedEvent = jsonEvent({
163163
});
164164

165165
await client.appendToStream("order-stream", orderPlacedEvent, {
166-
expectedRevision: revision,
166+
streamState revision,
167167
});
168168

169169
const paymentProcessedEvent = jsonEvent({
@@ -178,7 +178,7 @@ const paymentProcessedEvent = jsonEvent({
178178
});
179179

180180
await client.appendToStream("order-stream", paymentProcessedEvent, {
181-
expectedRevision: revision,
181+
streamState revision,
182182
});
183183
```
184184

docs/api/authentication.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ 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
```ts
39-
const connectionString = `esdb://admin:changeit@{endpoint}?tls=true&userCertFile={pathToCaFile}&userKeyFile={pathToKeyFile}`;
40-
const client = EventStoreDBClient.connectionString(connectionString);
39+
const connectionString = `kurrentdb://admin:changeit@{endpoint}?tls=true&userCertFile={pathToCaFile}&userKeyFile={pathToKeyFile}`;
40+
const client = KurrentDBClient.connectionString(connectionString);
4141
```

docs/api/delete-stream.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ head:
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: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ order: 1
33
head:
44
- - title
55
- {}
6-
- Getting Started | NodeJS | Clients | EventStoreDB Docs
6+
- Getting Started | NodeJS | 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
@@ -27,48 +27,48 @@ yarn add @eventstore/db-client@~6.2
2727
```
2828
:::
2929

30-
## Connecting to EventStoreDB
30+
## Connecting to KurrentDB
3131

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

3434
::: tip Insecure clusters
35-
The recommended way to connect to EventStoreDB is using secure mode (which is
36-
the default). However, if your EventStoreDB instance is running in insecure
35+
The recommended way to connect to KurrentDB is using secure mode (which is
36+
the default). However, if your KurrentDB instance is running in insecure
3737
mode, you must explicitly set `tls=false` in your connection string or client configuration.
3838
:::
3939

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

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

45-
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.
45+
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.
4646

47-
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.
47+
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.
4848

4949
::: info Gossip support
50-
Since version 22.10, esdb supports gossip on single-node deployments, so
51-
`esdb+discover://` can be used for any topology, including single-node setups.
50+
Since version 22.10, kurrentdb supports gossip on single-node deployments, so
51+
`kurrentdb+discover://` can be used for any topology, including single-node setups.
5252
:::
5353

5454
For cluster connections using discovery, use the following format:
5555

5656
```
57-
esdb+discover://admin:[email protected]:2113
57+
kurrentdb+discover://admin:[email protected]:2113
5858
```
5959

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

6262
For direct connections to specific endpoints, you can specify individual nodes:
6363

6464
```
65-
esdb://admin:[email protected]:2113,node2.dns.name:2113,node3.dns.name:2113
65+
kurrentdb://admin:[email protected]:2113,node2.dns.name:2113,node3.dns.name:2113
6666
```
6767

6868
Or for a single node:
6969

7070
```
71-
esdb://admin:changeit@localhost:2113
71+
kurrentdb://admin:changeit@localhost:2113
7272
```
7373

7474
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.
@@ -89,21 +89,21 @@ There are a number of query parameters that can be used in the connection string
8989
| `userCertFile` | String, file path | None | User certificate file for X.509 authentication. |
9090
| `userKeyFile` | String, file path | None | Key file for the user certificate used for X.509 authentication. |
9191

92-
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.
92+
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.
9393

9494
## Creating a client
9595

9696
First, create a client and get it connected to the database.
9797

9898
```ts
99-
const client = EventStoreDBClient.connectionString`esdb://localhost:2113?tls=false`;
99+
const client = KurrentDBClient.connectionString`kurrentdb://localhost:2113?tls=false`;
100100
```
101101

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

104104
## Creating an event
105105

106-
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.
106+
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.
107107

108108
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.
109109

docs/api/observability.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ store operations with distributed tracing support.
1717
You'll need to add OpenTelemetry dependencies to your project:
1818

1919
```bash
20-
npm install --save @opentelemetry/api @opentelemetry/sdk-trace-node @opentelemetry/instrumentation @eventstore/opentelemetry
20+
npm install --save @opentelemetry/api @opentelemetry/sdk-trace-node @opentelemetry/instrumentation @kurrent/opentelemetry
2121
```
2222

2323
For exporters, you might also want to install:
@@ -38,14 +38,14 @@ exporters. Here's a minimal setup:
3838
```ts
3939
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
4040
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
41-
const { EventStoreDBInstrumentation } = require('@eventstore/opentelemetry');
41+
const { KurrentDBInstrumentation } = require('@eventstore/opentelemetry');
4242

4343
const provider = new NodeTracerProvider();
4444
provider.register();
4545

4646
registerInstrumentations({
4747
instrumentations: [
48-
new EventStoreDBInstrumentation(),
48+
new KurrentDBInstrumentation(),
4949
],
5050
});
5151
```
@@ -79,23 +79,23 @@ For detailed configuration options, refer to the
7979
### What Gets Traced
8080

8181
The Node.js client automatically creates traces for append and subscription
82-
operations when the EventStoreDB instrumentation is registered.
82+
operations when the KurrentDB instrumentation is registered.
8383

8484
### Trace Attributes
8585

8686
Each trace includes metadata to help with debugging and monitoring:
8787

88-
| Attribute | Description | Example |
89-
| --------------------------------- | -------------------------------------- | ------------------------------------- |
90-
| `db.user` | Database user name | `admin` |
91-
| `db.system` | Database system identifier | `eventstoredb` |
92-
| `db.operation` | Type of operation performed | `streams.append`, `streams.subscribe` |
93-
| `db.eventstoredb.stream` | Stream name or identifier | `user-events-123` |
94-
| `db.eventstoredb.subscription.id` | Subscription identifier | `user-events-123-sub` |
95-
| `db.eventstoredb.event.id` | Event identifier | `event-456` |
96-
| `db.eventstoredb.event.type` | Event type identifier | `user.created` |
97-
| `server.address` | EventStoreDB server address | `localhost` |
98-
| `server.port` | EventStoreDB server port | `2113` |
99-
| `exception.type` | Exception type if an error occurred | |
100-
| `exception.message` | Exception message if an error occurred | |
101-
| `exception.stacktrace` | Stack trace
88+
| Attribute | Description | Example |
89+
| ------------------------------ | -------------------------------------- | ------------------------------------- |
90+
| `db.user` | Database user name | `admin` |
91+
| `db.system` | Database system identifier | `kurrentdb` |
92+
| `db.operation` | Type of operation performed | `streams.append`, `streams.subscribe` |
93+
| `db.kurrentdb.stream` | Stream name or identifier | `user-events-123` |
94+
| `db.kurrentdb.subscription.id` | Subscription identifier | `user-events-123-sub` |
95+
| `db.kurrentdb.event.id` | Event identifier | `event-456` |
96+
| `db.kurrentdb.event.type` | Event type identifier | `user.created` |
97+
| `server.address` | KurrentDB server address | `localhost` |
98+
| `server.port` | KurrentDB server port | `2113` |
99+
| `exception.type` | Exception type if an error occurred | |
100+
| `exception.message` | Exception message if an error occurred | |
101+
| `exception.stacktrace` | Stack trace | |

docs/api/persistent-subscriptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ resources.
198198

199199
For use with an indexing projection such as the system `$by_category` projection.
200200

201-
EventStoreDB inspects the event for its source stream id, hashing the id to one
201+
KurrentDB inspects the event for its source stream id, hashing the id to one
202202
of 1024 buckets assigned to individual clients. When a client disconnects, its
203203
buckets are assigned to other clients. When a client connects, it is assigned
204204
some existing buckets. This naively attempts to maintain a balanced workload.

docs/api/projections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ head:
99

1010
# Projection management
1111

12-
The client provides a way to manage projections in EventStoreDB.
12+
The client provides a way to manage projections in KurrentDB.
1313

1414
For a detailed explanation of projections, see the [server documentation](@server/features/projections/README.md).
1515

0 commit comments

Comments
 (0)