rabbitmq / rabbitmq-stream-go-client

A client library for RabbitMQ streams
MIT License
167 stars 18 forks source link

Add super stream producer #288

Closed Gsantomaggio closed 5 months ago

Gsantomaggio commented 6 months ago

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

codecov[bot] commented 6 months ago

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 :warning:
pkg/stream/environment.go 71.42% 3 Missing and 3 partials :warning:
pkg/stream/client.go 93.33% 1 Missing and 1 partial :warning:
pkg/stream/producer.go 77.77% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Gsantomaggio commented 5 months ago

Will merge after pairing with @DanielePalaia