Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
histhub
wikidata-lib
Commits
aa5d872e
Commit
aa5d872e
authored
May 16, 2019
by
Tobias Steiner
Browse files
Add a key to the kafka message
parent
06035a7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/index.ts
View file @
aa5d872e
...
...
@@ -80,7 +80,7 @@ kafka.init().then(async () => {
.
pipe
(
new
ReporterCounter
({
objectMode
:
true
},
core
.
getReporter
(
10000
,
'
analyser
'
),
'
read
'
))
.
pipe
(
new
AnalyserTransformable
({
objectMode
:
true
},
core
.
getUriBuilder
(),
core
.
getNconf
()))
.
pipe
(
new
ReporterCounter
({
objectMode
:
true
},
core
.
getReporter
(
10000
,
'
analyser
'
),
'
write
'
))
.
pipe
(
new
StreamProducerPreparer
({
objectMode
:
true
,
topic
:
core
.
getNconf
().
get
(
'
producer:analyser:topics
'
),
partition
:
-
1
}))
.
pipe
(
new
StreamProducerPreparer
({
objectMode
:
true
,
topic
:
core
.
getNconf
().
get
(
'
producer:analyser:topics
'
),
partition
:
-
1
,
key
:
(
d
)
=>
d
.
id
}))
.
pipe
(
new
ProducerStream
(
analyseProducer
,
{
objectMode
:
true
,
topic
:
core
.
getNconf
().
get
(
'
producer:analyser:topics
'
)}));
core
.
getLogger
().
info
(
'
Pipes are registered
'
);
}
catch
(
error
)
{
...
...
Write
Preview
Supports
Markdown
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