-
Notifications
You must be signed in to change notification settings - Fork 13
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
Expose kafka producer, closes #9 #31
Conversation
"github.com/Trendyol/kafka-cronsumer/pkg/logger" | ||
"github.com/segmentio/kafka-go/protocol" |
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.
We want to get rid of this dependency at our pkg/kafka directory so we defined new type alias and do some implementation FromHeaders
, ToHeaders
as shown above.
Time time.Time | ||
} | ||
|
||
type MessageBuilder struct { |
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.
After implementing builder pattern in our Message
struct, we wanted to extract it new file as cronsumer_message
. Why we added prefix cronsumer_? It because we want to separate from internal/message struct.
@@ -0,0 +1,70 @@ | |||
package internal |
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.
We wanted to extract all header related logic to a dedicated file.
No description provided.