Skip to content

Commit 3aaea1a

Browse files
Disintegrate v3.0.0 (#225)
* feat: add stream end * remove hash indexes * refactor: allow event in mutate_all * chore: add break listener when processing timeout occurs * refactor: example rename * test: add insert test * chore: add migrator * update lock * improve migrator * fix migrator * reuse transaction to stream events * refactoring stream_with * wip: add retry * Impl listener constructor for AbortRetry retry policy * rename stop to abort * stop main listener loop if after retries * add retry callback to example * doc fixes * return the handler error after releasing the lock * refactoring * fix docker-compose * better query * change epoch_id name * fix rebase * rename * bump disintegrate version * update deps * reset subscriptions_concurrency --------- Co-authored-by: Valerio Iachini <valerio.iachini@gmail.com> Co-authored-by: Valerio <valerio.iachini@prima.it>
1 parent d08ae96 commit 3aaea1a

38 files changed

Lines changed: 1754 additions & 1182 deletions

Cargo.lock

Lines changed: 841 additions & 739 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,24 @@
22
edition = "2021"
33
license = "MIT"
44
repository = "https://github.com/disintegrate-es/disintegrate"
5-
keywords = ["event-sourcing", "domain-driven-design", "ddd", "event-driven-architecture", "cqrs", "aggregate", "event-store"]
6-
categories = ["development-tools", "software-libraries", "event-sourcing", "domain-driven-design"]
5+
keywords = [
6+
"event-sourcing",
7+
"domain-driven-design",
8+
"ddd",
9+
"event-driven-architecture",
10+
"cqrs",
11+
"aggregate",
12+
"event-store",
13+
]
14+
categories = [
15+
"development-tools",
16+
"software-libraries",
17+
"event-sourcing",
18+
"domain-driven-design",
19+
]
720
authors = [
8-
"Luca Iachini <luca.iachini89@gmail.com>",
9-
"Valerio Iachini <valerio.iachini@gmail.com>",
21+
"Luca Iachini <luca.iachini89@gmail.com>",
22+
"Valerio Iachini <valerio.iachini@gmail.com>",
1023
]
1124
readme = "README.md"
1225

@@ -20,6 +33,5 @@ members = [
2033
"disintegrate-serde",
2134
"examples/cart",
2235
"examples/courses",
23-
"examples/banking"
36+
"examples/banking",
2437
]
25-

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,16 @@ To add Disintegrate to your project, follow these steps:
6969
7070
```toml
7171
[dependencies]
72-
disintegrate = "2.1.0"
73-
disintegrate-postgres = "2.1.0"
72+
disintegrate = "3.0.0"
73+
disintegrate-postgres = "3.0.0"
7474
```
7575
7676
* Disintegrate provides several features that you can enable based on your project requirements. You can include them in your `Cargo.toml` file as follows:
7777
7878
```toml
7979
[dependencies]
80-
disintegrate = { version = "2.1.0", features = ["macros", "serde-prost"] }
81-
disintegrate-postgres = { version = "2.1.0", features = ["listener"] }
80+
disintegrate = { version = "3.0.0", features = ["macros", "serde-prost"] }
81+
disintegrate-postgres = { version = "3.0.0", features = ["listener"] }
8282
```
8383
8484
* The macros feature enables the use of derive macros to simplify events implementations.
@@ -90,7 +90,7 @@ To add Disintegrate to your project, follow these steps:
9090
* To enable Prost serialization, use the `serde-prost` feature: `features = ["serde-prost"]`.
9191
* To enable Protocol Buffers serialization, use the `serde-protobuf` feature: `features = ["serde-protobuf"]`.
9292
93-
* If you're using the PostgreSQL event store backend and want to use the listener mechanism, you can enable the `listener` feature: `disintegrate-postgres = {version = "2.1.0", features = ["listener"]}`.
93+
* If you're using the PostgreSQL event store backend and want to use the listener mechanism, you can enable the `listener` feature: `disintegrate-postgres = {version = "3.0.0", features = ["listener"]}`.
9494
9595
2. Define the list of events in your application. You can use the Event Storming technique to identify the events that occur in your system. Here's an example of defining events using Disintegrate:
9696

disintegrate-macros/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "disintegrate-macros"
33
description = "Disintegrate macros. Not for direct use. Refer to the `disintegrate` crate for details."
4-
version = "2.1.0"
4+
version = "3.0.0"
55
license.workspace = true
66
edition.workspace = true
77
authors.workspace = true
@@ -16,12 +16,12 @@ never = []
1616

1717
[dependencies]
1818
heck = "0.5.0"
19-
proc-macro2 = "1.0.86"
20-
quote = "1.0.38"
21-
syn = { version = "2.0.65", features = ["full"] }
19+
proc-macro2 = "1.0.103"
20+
quote = "1.0.42"
21+
syn = { version = "2.0.111", features = ["full"] }
2222

2323
[dev-dependencies]
24-
disintegrate = { version = "2.1.0", path = "../disintegrate", features = ["macros"] }
24+
disintegrate = { version = "3.0.0", path = "../disintegrate", features = ["macros"] }
2525

2626
[package.metadata.docs.rs]
2727
all-features = true

disintegrate-postgres/Cargo.toml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "disintegrate-postgres"
33
description = "Disintegrate PostgresDB implementation. Not for direct use. Refer to the `disintegrate` crate for details."
4-
version = "2.1.0"
4+
version = "3.0.0"
55
license.workspace = true
66
edition.workspace = true
77
authors.workspace = true
@@ -13,24 +13,24 @@ default = []
1313
listener = ["dep:tokio-util"]
1414

1515
[dependencies]
16-
disintegrate = { version = "2.1.0", path = "../disintegrate" }
17-
disintegrate-serde = { version = "2.1.0", path = "../disintegrate-serde" }
18-
disintegrate-macros = { version = "2.1.0", path = "../disintegrate-macros" }
19-
serde = "1.0.217"
20-
serde_json = "1.0.140"
16+
disintegrate = { version = "3.0.0", path = "../disintegrate" }
17+
disintegrate-serde = { version = "3.0.0", path = "../disintegrate-serde" }
18+
disintegrate-macros = { version = "3.0.0", path = "../disintegrate-macros" }
19+
serde = "1.0.228"
20+
serde_json = "1.0.146"
2121
sqlx = { version = "0.8.6", features = ["postgres", "runtime-tokio-rustls", "uuid"] }
22-
async-trait = "0.1.88"
23-
futures = "0.3.30"
24-
async-stream = "0.3.5"
25-
thiserror = "2.0.11"
26-
tokio = {version = "1.47.1", features = ["macros"]}
27-
tokio-util = {version = "0.7.16", optional = true}
28-
uuid = { version = "1.16.0", features = ["v3"] }
22+
async-trait = "0.1.89"
23+
futures = "0.3.31"
24+
async-stream = "0.3.6"
25+
thiserror = "2.0.17"
26+
tokio = {version = "1.48.0", features = ["macros"]}
27+
tokio-util = {version = "0.7.17", optional = true}
28+
uuid = { version = "1.19.0", features = ["v3"] }
2929
md-5 = "0.10.6"
30-
paste = "1.0.14"
30+
paste = "1.0.15"
3131

3232
[dev-dependencies]
33-
disintegrate-serde = { version = "2.1.0", path = "../disintegrate-serde", features = ["json"] }
33+
disintegrate-serde = { version = "3.0.0", path = "../disintegrate-serde", features = ["json"] }
3434

3535
[package.metadata.docs.rs]
3636
all-features = true

disintegrate-postgres/src/error.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
use std::error::Error as StdError;
22
use thiserror::Error;
33

4+
use crate::migrator;
5+
46
/// Represents all the ways a method can fail within Disintegrate Postgres.
57
#[derive(Error, Debug)]
68
pub enum Error {
9+
/// Error returned from the migrator.
10+
#[error(transparent)]
11+
Migration(#[from] migrator::Error),
712
/// Error returned from the database.
813
#[error(transparent)]
914
Database(#[from] sqlx::Error),

0 commit comments

Comments
 (0)