Repository navigation
[feat][io] Provide a HTTP Sink - #17581
Conversation
|
/pulsarbot run-failure-checks |
6d6d2cf to
7aa8d84
Compare
hezhangjian
left a comment
There was a problem hiding this comment.
better to add new line on the end of .java file
done. PTAL. |
|
/pulsarbot run-failure-checks |
codelipenghui
left a comment
There was a problem hiding this comment.
Hi @cbornet thanks for the contribution
We should start with a proposal since it's a new connector will introduced to Pulsar repo.
And is it possible to move the pulsar-adapters?
|
Sure, I'll write a PIP.
I'm not sure pulsar-adapters is the good place if we don't move the other connectors. |
|
Implements PIP-208: HTTP Sink |
|
The pr had no activity for 30 days, mark with Stale label. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #17581 +/- ##
=============================================
+ Coverage 34.91% 45.96% +11.05%
- Complexity 5707 17715 +12008
=============================================
Files 607 1582 +975
Lines 53396 128874 +75478
Branches 5712 14174 +8462
=============================================
+ Hits 18644 59240 +40596
- Misses 32119 63544 +31425
- Partials 2633 6090 +3457
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
(cherry picked from commit b193051) Cherry pick and: * Add the docker image 'all' * Set source compatibility to JDK11 for the new sink
|
@cbornet It will help users a lot if you can add the docs for this feature. Do you have any planned updates on that? |
Motivation
The HTTP Sink pushes records to any HTTP server with the record value in the body of POST method.
It means you can have event push notification to a simple webhook. This enables the number of applications and platforms to integrate with Pulsar in an existing architecture without Pulsar’s library dependencies and constraints of OS and language that current Pulsar clients can only support.
The Sink takes inspiration from Pulsar Beam and the Confluent HTTP Sink connector.
The body of the HTTP request is the JSON representation of the record value.
Some headers are added to the HTTP request:
PulsarTopic: the topic of the recordPulsarKey: the key of the recordPulsarEventTime: the event time of the recordPulsarPublishTime: the publish time of the recordPulsarMessageId: the ID of the message contained in the recordPulsarProperties-*: each record property is passed with the property name prefixed byPulsarProperties-Modifications
trivial
Verifying this change
This change added tests and can be verified as follows:
HttpSinkTesttestsDoes this pull request potentially affect one of the following parts:
no
If the box was checked, please highlight the changes
Documentation
doc-required(Your PR needs to update docs and you will update later)
doc-not-needed(Please explain why)
doc(Your PR contains doc changes)
doc-complete(Docs have been already added)
Matching PR in forked repository
PR in forked repository: cbornet#5