Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Schüpbach
Kafkaesque
Commits
5211c227
Verified
Commit
5211c227
authored
Aug 18, 2021
by
Sebastian Schüpbach
Browse files
provide fallback if no client configurations were defined
parent
e6a4b9ed
Pipeline
#31536
passed with stages
in 10 minutes and 12 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/consumer.rs
View file @
5211c227
...
...
@@ -52,8 +52,8 @@ fn main() -> Result<()> {
let
input_topic
=
matches
.value_of
(
"input_topic"
)
.unwrap
();
let
consumer_configs
=
matches
.values_of
(
"consumer_configs"
)
.
context
(
"consumer configs"
)
?
.
collect
::
<
Vec
<&
str
>>
(
);
.
and_then
(|
v
|
Some
(
v
.collect
::
<
Vec
<&
str
>>
()))
.
unwrap_or
(
vec!
[]
);
let
consumer
:
BaseConsumer
<
ConsumerCallbackLogger
>
=
kafka
::
create_client
(
bootstrap_servers
,
...
...
src/bin/processor.rs
View file @
5211c227
...
...
@@ -135,12 +135,12 @@ fn main() -> Result<()> {
let
output_topic
=
matches
.value_of
(
"output_topic"
)
.context
(
"output topic"
)
?
;
let
consumer_configs
=
matches
.values_of
(
"consumer_configs"
)
.
context
(
"consumer configs"
)
?
.
collect
::
<
Vec
<&
str
>>
(
);
.
and_then
(|
v
|
Some
(
v
.collect
::
<
Vec
<&
str
>>
()))
.
unwrap_or
(
vec!
[]
);
let
producer_configs
=
matches
.values_of
(
"producer_configs"
)
.
context
(
"producer configs"
)
?
.
collect
::
<
Vec
<&
str
>>
(
);
.
and_then
(|
v
|
Some
(
v
.collect
::
<
Vec
<&
str
>>
()))
.
unwrap_or
(
vec!
[]
);
let
consumer
:
BaseConsumer
<
ConsumerCallbackLogger
>
=
kafka
::
create_client
(
bootstrap_servers
,
...
...
src/bin/producer.rs
View file @
5211c227
...
...
@@ -70,8 +70,8 @@ fn main() -> Result<()> {
let
input_file
=
matches
.value_of
(
"INPUT"
)
.unwrap
();
let
producer_configs
=
matches
.values_of
(
"producer_configs"
)
.
context
(
"producer configs"
)
?
.
collect
::
<
Vec
<&
str
>>
(
);
.
and_then
(|
v
|
Some
(
v
.collect
::
<
Vec
<&
str
>>
()))
.
unwrap_or
(
vec!
[]
);
let
producer
:
ThreadedProducer
<
ProducerCallbackLogger
>
=
kafka
::
create_client
(
bootstrap_servers
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment