-
Notifications
You must be signed in to change notification settings - Fork 10
ParsingFailureAction and related API changes #7
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
Conversation
PullResult instead of Option for RabbitMQPullConsumer ConversionException to api module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Remove the
parsingFailureActioncompletely. - The
consumeraction should accept a sealed trait instead of plainDelivery, so users were able to handle the parsing failure.
README.md
Outdated
|
|
||
| #### Consumer parsing failure | ||
|
|
||
| It may happen the delivery is not parsable as your `MyClass`. It won't be passed into the consumer and `ParsingFailureAction` will be used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to have something like PullResult as input to regular consumer (created via newConsumer). So use a sealed trait instead of plain Delivery. I believe the code would be more concise.
README.md
Outdated
|
|
||
| #### Pull-Consumer parsing failure | ||
|
|
||
| It may happen the delivery is not parsable as your `MyClass`. `ParsingFailureAction` will be used for handling such message and you will get |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to remove this feature - it's not IMHO required because you can achieve the same behavior just by processing the PullResult.MalformedContent when calling pull. You have to handle this case anyway...
removed ParsingFailureAction PullResult removed MalformedContent
|
Updated. The |
Migration-5-6.md
Outdated
| 1. The API now uses type-conversions - provide type and related converter when creating producer/consumer. | ||
| See [related section](README.md#providing-converters-for-producer/consumer) in docs. | ||
| 1. The `Delivery` is now generic - e.g. `Delivery[Bytes]` (depends on type-conversion). | ||
| 1. The `Delivery` is now sealed trait - there are `Delivery.Ok[A]` (e.g. `Delivery[Bytes]` ,depends on type-conversion) and `Delivery.MalformedContent`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid spacing around ,
PullResult instead of Option for RabbitMQPullConsumer
ConversionException to api module
Sorry for so big PR however it's cause mainly by moving
ConversionExceptioninto another package (and module).