Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated docs #244

Merged
merged 4 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions documentation/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Example shows in-memory implementation.
## Configuration
### Install packages
```csharp
dotnet add package TransactionalBox.Outbox
dotnet add package TransactionalBox.Inbox
dotnet add package TransactionalBox
```
### Register
```csharp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
sidebar_position: 1
sidebar_position: 4
---

# General
# Inbox

The inbox is responsible for getting messages from the transport and adding them to the storage, and then processes these messages.

Expand Down
4 changes: 0 additions & 4 deletions documentation/docs/inbox/_category_.json

This file was deleted.

4 changes: 0 additions & 4 deletions documentation/docs/inbox/storage/_category_.json

This file was deleted.

54 changes: 0 additions & 54 deletions documentation/docs/inbox/storage/entity-framework-core.md

This file was deleted.

20 changes: 0 additions & 20 deletions documentation/docs/inbox/storage/in-memory.md

This file was deleted.

4 changes: 0 additions & 4 deletions documentation/docs/inbox/transport/_category_.json

This file was deleted.

23 changes: 0 additions & 23 deletions documentation/docs/inbox/transport/kafka.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
sidebar_position: 1
sidebar_position: 3
---

# General
# Outbox

The outbox is responsible for adding messages to the storage and then adding at least once to the transport.

Expand Down
4 changes: 0 additions & 4 deletions documentation/docs/outbox/_category_.json

This file was deleted.

23 changes: 0 additions & 23 deletions documentation/docs/outbox/transport/kafka.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Storage",
"position": 2
"position": 5
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ builder.Services.AddDbContextPool<SampleDbContext>(x => x.Use...(connectionStrin
```
:::



## Configuration
### Install package
## Install package
```csharp
dotnet add package TransactionalBox.Outbox.EntityFrameworkCore
dotnet add package TransactionalBox.EntityFrameworkCore
```

## Outbox
### Register entity framework as outbox storage
```csharp
builder.Services.AddTransactionalBox(x =>
Expand All @@ -51,4 +49,27 @@ public class SampleDbContext : DbContext
}
...
}
```

## Inbox
### Register entity framework as inbox storage
```csharp
builder.Services.AddTransactionalBox(x =>
{
x.AddInbox(storage => storage.UseEntityFramework<SampleDbContext>());
});

```

### Add Inbox to ModelBuilder
```csharp
public class SampleDbContext : DbContext
{
...
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.AddInbox();
}
...
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,22 @@ InMemory is registered as default storage.
Intended only for testing and learning.
:::

## Outbox
### Register
```csharp
builder.Services.AddTransactionalBox(x =>
{
x.AddOutbox();
});

```

## Inbox
### Register
```csharp
builder.Services.AddTransactionalBox(x =>
{
x.AddInbox();
});

```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Transport",
"position": 2
"position": 6
}
35 changes: 35 additions & 0 deletions documentation/docs/transport/kafka.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar_position: 1
---

# Apache Kafka

## Install package
```csharp
dotnet add package TransactionalBox.Kafka
```
## Outbox
### Register
```csharp
builder.Services.AddTransactionalBox(x =>
{
x.AddOutbox(
storage => ...,
transport => transport.UseKafka(settings => settings.BootstrapServers = bootstrapServers)
);
});

```

## Inbox
### Register
```csharp
builder.Services.AddTransactionalBox(x =>
{
x.AddInbox(
storage => ...,
transport => transport.UseKafka(settings => settings.BootstrapServers = bootstrapServers)
);
});

```