-
Notifications
You must be signed in to change notification settings - Fork 3
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
first cut at zinger rewrite as a kafka syncer #17
Conversation
} | ||
|
||
type Credentials struct { | ||
User string | ||
Password string | ||
} | ||
|
||
const HostEnv = "ZED_LAKE_HOST" |
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.
Maybe use HostEnv from zed/cmd/zed/api/command.go?
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.
Yeah I copied this from there, but importing would bring in a bunch of stuff that isn't used. If we wanted to do this, we should move to this logic to zed/cli/hostflags
} | ||
|
||
func (p *Producer) Run(ctx context.Context, reader zio.Reader) error { | ||
fmt.Printf("producing messages to topic %q...\n", p.topic) |
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.
Should a library package be printing to stdout?
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.
Right now, the entirety of the zinger package is a CLI tool so I vote to fix this later.
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 made issue #21
fifo/from.go
Outdated
return ncommit, nrec, nil | ||
} | ||
|
||
// AdjustOffsetsAndShape runs a local Zed program to adjust the kafka offset fields |
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.
// AdjustOffsetsAndShape runs a local Zed program to adjust the kafka offset fields | |
// AdjustOffsetsAndShape runs a local Zed program to adjust the Kafka offset fields |
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.
got it
README.md
Outdated
> Note that `zinger sync from` does not currently support multiplexing multiple | ||
> inbound topics, but support for this is straightforward and we will add it soon. | ||
> | ||
> We also need to adapt `sync from` so it updates te consumer commit offsets, |
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 also need to adapt `sync from` so it updates te consumer commit offsets, | |
> We also need to adapt `sync from` so it updates the consumer commit offsets, |
fifo/from.go
Outdated
} | ||
// This shouldn't happen since the consumer automatically adds | ||
// this field. | ||
return nil, fmt.Errorf("value read from Kafka topic missing kafka metadata field: %s", s) |
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.
return nil, fmt.Errorf("value read from Kafka topic missing kafka metadata field: %s", s) | |
return nil, fmt.Errorf("value read from Kafka topic missing 'kafka' metadata field: %s", s) |
fifo/from.go
Outdated
// This should not happen. | ||
err = fmt.Errorf("[ERR! %w]", err) | ||
} | ||
return nil, fmt.Errorf("kafka meta-data field is missing 'offset' field: %s", s) |
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.
return nil, fmt.Errorf("kafka meta-data field is missing 'offset' field: %s", s) | |
return nil, fmt.Errorf("'kafka' metadata field is missing 'offset' field: %s", s) |
README.md
Outdated
`zinger` is a connector between Kafka topics and Zed lakes. | ||
It can run in either direction: syncing a Zed lake to a Kafka topic or | ||
syncing a Kafka topic to a Zed lake. | ||
zinger` is a connector between [Kafka](https://kafka.apache.org/) and |
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.
zinger` is a connector between [Kafka](https://kafka.apache.org/) and | |
`zinger` is a connector between [Kafka](https://kafka.apache.org/) and |
No description provided.