-
Notifications
You must be signed in to change notification settings - Fork 5
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
[PLATFORM-1085]: Add some event bus specific impl #155
[PLATFORM-1085]: Add some event bus specific impl #155
Conversation
use crate::Aggregate; | ||
|
||
#[derive(TypedBuilder)] | ||
pub struct RabbitEventBusConfig<'a> { |
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.
Honestly not so sure about if this builder patter with typed-builder
makes sense or is better to implement a manual builder..
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.
Since this builder has 9000 fields I don't see why not use typed-builder
?
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.
This looks good to me - an example or two and some tests (maybe examples used as tests?) might be nice, but since this is all work in progress, I don't think it's a blocker
use crate::Aggregate; | ||
|
||
#[derive(TypedBuilder)] | ||
pub struct RabbitEventBusConfig<'a> { |
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.
Since this builder has 9000 fields I don't see why not use typed-builder
?
0672524
topic: String, | ||
request_timeout: Duration, | ||
error_handler: Box<dyn Fn(KafkaEventBusError) + Send + Sync>, | ||
_phantom: PhantomData<A>, |
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.
Is the phantom data really needed?
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.
Yes, because KafkaEventBus takes that A
generic that is not used in any field of the struct otherwise..
@ollaw can you please sign the drone.yml file? |
Don't you have a DevOps champion to do that ? |
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.
Not a blocking comment, I certainly lost track of some changes scattered along the series of restructuring prs.
sequence_number: 1, | ||
}; | ||
|
||
bus.publish(&store_event).await; |
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.
It is not clear to me if bus.publish(&store_event).await;
is automatically called by some part of the library or if we expect the library user to call it (I guess I got lost in in the changes of this series of prs 😓). Would it make sense to add an example for the event bus flow?
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've already added that in another PR :)
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.
Ok 👍. So I will wait to see all together.
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.
Looking forward to see all the pieces together 👀.
https://prima-assicurazioni-spa.myjetbrains.com/youtrack/issue/PLATFORM-1085