Skip to content
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

Merged
merged 3 commits into from
Dec 30, 2022
Merged

Expose kafka producer, closes #9 #31

merged 3 commits into from
Dec 30, 2022

Conversation

Abdulsametileri
Copy link
Member

No description provided.

"github.com/Trendyol/kafka-cronsumer/pkg/logger"
"github.com/segmentio/kafka-go/protocol"
Copy link
Member Author

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 {
Copy link
Member Author

@Abdulsametileri Abdulsametileri Dec 30, 2022

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
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants