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

Add super stream producer #288

Merged
merged 12 commits into from
Apr 5, 2024
Merged

Add super stream producer #288

merged 12 commits into from
Apr 5, 2024

Conversation

Gsantomaggio
Copy link
Member

@Gsantomaggio Gsantomaggio commented Mar 28, 2024

SuperStreamProducer


New struct to create the super stream producer:

The main features are:

Example:

      superStreamProducer, err := env.NewSuperStreamProducer(superStreamName,
		stream.NewSuperStreamProducerOptions(
			stream.NewHashRoutingMurmurStrategy(func(message message.StreamMessage) string {
				return message.GetApplicationProperties()["myKey"].(string)
			})).SetClientProvidedName("my-superStreamProducer"))
	CheckErr(err)

Here the full code example

Add Murmur32 strategy
Add RoutingStrategy interface

Signed-off-by: Gabriele Santomaggio <[email protected]>
@Gsantomaggio Gsantomaggio added this to the 1.4.0 milestone Mar 28, 2024
Copy link

codecov bot commented Mar 28, 2024

Codecov Report

Attention: Patch coverage is 89.18919% with 32 lines in your changes are missing coverage. Please review.

Project coverage is 83.79%. Comparing base (34fd584) to head (1c042cb).

Files Patch % Lines
pkg/stream/super_stream_producer.go 87.35% 13 Missing and 9 partials ⚠️
pkg/stream/environment.go 71.42% 3 Missing and 3 partials ⚠️
pkg/stream/client.go 93.33% 1 Missing and 1 partial ⚠️
pkg/stream/producer.go 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #288      +/-   ##
==========================================
+ Coverage   83.43%   83.79%   +0.36%     
==========================================
  Files          24       25       +1     
  Lines        3350     3610     +260     
==========================================
+ Hits         2795     3025     +230     
- Misses        402      419      +17     
- Partials      153      166      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Gabriele Santomaggio <[email protected]>
Signed-off-by: Gabriele Santomaggio <[email protected]>
to reconnect the stream.

Signed-off-by: Gabriele Santomaggio <[email protected]>
add route query

Signed-off-by: Gabriele Santomaggio <[email protected]>
add channel for channel close

Signed-off-by: Gabriele Santomaggio <[email protected]>
Signed-off-by: Gabriele Santomaggio <[email protected]>
during the reconnection

Signed-off-by: Gabriele Santomaggio <[email protected]>
@Gsantomaggio Gsantomaggio marked this pull request as ready for review April 4, 2024 14:43
Signed-off-by: Gabriele Santomaggio <[email protected]>
Copy link

@DanielePalaia DanielePalaia left a comment

Choose a reason for hiding this comment

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

It looks good to me after the pairing session. Just added a few minor comments!

}
//type queue struct {
// Messages int `json:"messages"`
//}

Choose a reason for hiding this comment

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

Can this commented rows be deleted?

Signed-off-by: Gabriele Santomaggio <[email protected]>
@Gsantomaggio
Copy link
Member Author

Will merge after pairing with @DanielePalaia

@Gsantomaggio Gsantomaggio merged commit dea5823 into main Apr 5, 2024
4 checks passed
@Gsantomaggio Gsantomaggio deleted the super_stream_3 branch April 5, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants