-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
with the middleware, we'll be able to plug various things, we can get away with just a raw producer without any serialization for now.
Once we have a raw producer, we can then introduce a producer that respects schema out of the box.
Acceptance Criteria:
- Can initialize a producer
- Can add middleware to that producer
- The signature of the middleware should be same as core
- Can produce
*kafka.Message - Can
Flush(time.Duration) - Can
Close()
Here's how I want to initialize a producer:
package main
func main() {
messageProducer := producer.New(getConfluentProducer())
messageProducer.AddMiddleware(tracing.Middleware()) // don't worry about actually creating this middleware
messageProducer.AddMiddleware(block_storage.Middleware() // don't worry about actually creating this middleware
messageProducer.Produce(&kafka.Message{})
messageProducer.Flush(time.Milliseconds * 100)
err := messageProducer.Close()
if err != nil {
panic(err)
}
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed