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

[rust] implement pushconsumer #767

Merged
merged 33 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a08ef53
[WIP] push consumer
glcrazier Apr 30, 2024
ad29261
add push consumer
glcrazier Jun 5, 2024
97b69f1
use enum BackOffRetryPolicy
glcrazier Jun 5, 2024
df2ef41
refactor to optimize struct of Client
glcrazier Jun 6, 2024
9b261f7
add testcases
glcrazier Jun 7, 2024
6f838a1
implement standard push consumer
glcrazier Jun 9, 2024
74e14fe
fix typo
glcrazier Jun 9, 2024
0dcfe1c
format code
glcrazier Jun 9, 2024
f1fb52b
add license
glcrazier Jun 9, 2024
7b3a847
remove extra clones
glcrazier Jun 10, 2024
9f7628b
flush queues when shutting down actors
glcrazier Jun 12, 2024
3533d57
use TryFrom trait to parse retry policy
glcrazier Jun 13, 2024
0a96827
optimize message parsing error
glcrazier Jun 13, 2024
f318691
return option instead of result
glcrazier Jun 13, 2024
9905ae6
fix code style
glcrazier Jun 13, 2024
975c0ec
remove lifetime
glcrazier Jun 14, 2024
6546327
save time on repeating Box
glcrazier Jun 14, 2024
429a5b2
chore: update README doc, reflecting we are supporting push-consumer …
lizhanhui Jul 11, 2024
c37326e
refactor pushconsumer
glcrazier Jul 20, 2024
f25e082
fix typo
glcrazier Jul 20, 2024
8b09fb1
fix format
glcrazier Jul 20, 2024
d4a0be6
use correct tokio_util version
glcrazier Jul 20, 2024
03531b5
log error on process assignments
glcrazier Jul 23, 2024
8b174b7
fix tokio-util version
glcrazier Jul 23, 2024
f954382
implement Debug trait for AckEntryItem
glcrazier Jul 23, 2024
964c802
increase converage rate
glcrazier Jul 23, 2024
8076bd2
optimize code structure
glcrazier Jul 23, 2024
7e7afea
chore: test macos on macos-12
lizhanhui Aug 6, 2024
f66312c
fix: upgrade MSRV to 1.70 as dependent crate home requires it
lizhanhui Aug 6, 2024
2412a78
fix: remove Cargo.lock.min
lizhanhui Aug 6, 2024
81a1983
fix: fix MSRV check
lizhanhui Aug 6, 2024
2ecbba9
fix: specify working-directory
lizhanhui Aug 6, 2024
0dca7d7
chore: make cargo-clippy pass
lizhanhui Aug 6, 2024
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
38 changes: 22 additions & 16 deletions .github/workflows/rust_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ on:
workflow_call:
jobs:
fmt:
name: code style check
runs-on: ubuntu-latest
name: code style check
defaults:
run:
working-directory: ./rust
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -15,11 +18,13 @@ jobs:
toolchain: stable
components: rustfmt
- name: Code format check
working-directory: ./rust
run: cargo fmt --check
clippy:
name: clippy
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rust
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -31,11 +36,13 @@ jobs:
components: clippy
# Run clippy
- name: clippy check
working-directory: ./rust
run: cargo clippy --all-features -- -D warnings
doc:
name: doc check
runs-on: ubuntu-latest
name: doc check
defaults:
run:
working-directory: ./rust
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -45,27 +52,26 @@ jobs:
with:
toolchain: stable
- name: Build doc
working-directory: ./rust
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: --cfg docsrs
msrv:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rust
strategy:
matrix:
msrv: [1.61]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust version defined in Cargo.toml should be also bumped up to 1.70.0

name: msrv ${{ matrix.msrv }} check
msrv: [1.70.0]
name: MSRV ${{ matrix.msrv }} check
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install ${{ matrix.msrv }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.msrv }}
- name: Check MSRV ${{ matrix.msrv }}
working-directory: ./rust
run: cp .cargo/Cargo.lock.min Cargo.lock && cargo +${{ matrix.msrv }} fetch && cargo +${{ matrix.msrv }} check --locked --frozen
- name: Install cargo-msrv
run: |
cargo install cargo-msrv
cargo msrv --min ${{ matrix.msrv }}
build:
name: "${{ matrix.os }}"
runs-on: ${{ matrix.os }}
Expand All @@ -76,8 +82,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-11, windows-2022]
msrv: [1.61]
os: [ubuntu-20.04, macos-12, windows-2022]
msrv: [1.70]
steps:
- uses: actions/checkout@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
| Producer with timed/delay messages | ✅ | ✅ | ✅ | ✅ | ✅ | 🚧 | ✅ | 🚧 |
| Producer with transactional messages | ✅ | ✅ | ✅ | ✅ | ✅ | 🚧 | ✅ | 🚧 |
| Simple consumer | ✅ | ✅ | ✅ | ✅ | ✅ | 🚧 | ✅ | 🚧 |
| Push consumer with concurrent message listener | ✅ | ✅ | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 |
| Push consumer with FIFO message listener | ✅ | ✅ | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 |
| Push consumer with concurrent message listener | ✅ | ✅ | 🚧 | 🚧 | | 🚧 | 🚧 | 🚧 |
| Push consumer with FIFO message listener | ✅ | ✅ | 🚧 | 🚧 | | 🚧 | 🚧 | 🚧 |

## 先决条件和构建

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Provide cloud-native and robust solutions for Java, C++, C#, Golang, Rust and al
| Producer with timed/delay messages | ✅ | ✅ | ✅ | ✅ | ✅ | 🚧 | ✅ | 🚧 |
| Producer with transactional messages | ✅ | ✅ | ✅ | ✅ | ✅ | 🚧 | ✅ | 🚧 |
| Simple consumer | ✅ | ✅ | ✅ | ✅ | ✅ | 🚧 | ✅ | 🚧 |
| Push consumer with concurrent message listener | ✅ | ✅ | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 |
| Push consumer with FIFO message listener | ✅ | ✅ | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 |
| Push consumer with concurrent message listener | ✅ | ✅ | 🚧 | 🚧 | | 🚧 | 🚧 | 🚧 |
| Push consumer with FIFO message listener | ✅ | ✅ | 🚧 | 🚧 | | 🚧 | 🚧 | 🚧 |

## Prerequisite and Build

Expand Down
Loading
Loading