Closed
Conversation
henry739
reviewed
Apr 17, 2024
532b35f to
7243ce6
Compare
3a8d8f1 to
bac9292
Compare
bac9292 to
8ba2a73
Compare
robinbryce
reviewed
Jun 18, 2024
| // we need a timeout per message if RenewMessageLock is disabled | ||
| renewCtx, renewCancel, maxDuration = r.setTimeout(ctx, r.log, msg) | ||
| defer renewCancel() | ||
| r.processMessage(renewCtx, i+1, maxDuration, msg, r.serialHandler) |
Contributor
There was a problem hiding this comment.
This doesn't work for the forestrie use case. The handling of the whole batch needs to be in the application handler
Contributor
Author
There was a problem hiding this comment.
The Handler recives a slice of messages which it can process as it sees fit so the logic is in the application handler surely...
honourfish
reviewed
Jun 18, 2024
| if err != nil { | ||
| return fmt.Errorf("failed to open handler: %w", err) | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
just return nil in this if statement at the end and get rid of the else?
4886399 to
6e077a0
Compare
New functional option to add a serialHandler that reads N messages at
once and process them one at a time - serially.
receiver := NewReceiver(, WithSerialHandler(h, 200))
where h is an instance of Handler.
Defining a SerialHandler this way disables the normal parallel
processing defined by WithHandlers().
It is highly recommended to specify RenewMessageLock if the number of
received messages is high (say > 10). One has to be sure that processing
the number of messages within 60s is achievable.
AB#9378
6e077a0 to
9fc974c
Compare
Contributor
Author
|
obsolete - azbus is moved to go-service-common |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New functional option to add a serialHandler that reads N messages at
once and process them one at a time - serially.
where h is an instance of Handler.
Defining a SerialHandler this way disables the normal parallel
processing defined by WithHandlers().
It is highly recommended to specify RenewMessageLock if the number of
received messages is high (say > 10). One has to be sure that processing
the number of messages within 60s is achievable.
AB#9378