apache / apache/eventmesh

[Enhancement] SendMessageRequestHeader, SendMessageBatchRequestHeader and SendMessageBatchV2RequestHeader have almost same body

Open
#3,892 1 comment 0 reactions 0 assignees View on GitHub
enhancement Stale
Dominant language
Java
Stars
1.8k
Forks
658
Avg merge
11h 29m
Merged PRs (30d)
52

Description

### Search before asking

- [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues.

### Enhancement Request

* SendMessageRequestHeader, SendMessageBatchRequestHeader and SendMessageBatchV2RequestHeader have almost same body.
* `Assert.assertThat()` is deprecated in junit.
* There is a more convenient method of initializing Map.

### Describe the solution you'd like

* Abstract `SendMessageRequestHeader`, `SendMessageBatchRequestHeader` and `SendMessageBatchV2RequestHeader` these three classes.
* Use other api of junit.
* Use `ImmutableMap.of()` to create and init Map.

### Are you willing to submit PR?

- [X] Yes I am willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Locate SendMessageRequestHeader, SendMessageBatchRequestHeader, and SendMessageBatchV2RequestHeader and compare their shared structure first. Review the deprecated Assert.assertThat() usage and current Map initialization around these classes. Done means the shared header behavior is consolidated, the JUnit API is updated, and Map creation uses ImmutableMap.of().

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.