Skip to content
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

[Feature] Add HTTP Sink Connector to InfinyOn Hub #37

Closed
drc-infinyon opened this issue Apr 17, 2023 · 1 comment
Closed

[Feature] Add HTTP Sink Connector to InfinyOn Hub #37

drc-infinyon opened this issue Apr 17, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@drc-infinyon
Copy link

Productionize - https://github.com/infinyon/http-sink-prototype.

The sink connector must have

  • Integration Test
  • Publish workflow
  • Doc

HTTP Sink Connector

Official Infinyon HTTP Sink connector

Sink Connector

HTTP sink connector reads records from data streaming and generates an HTTP

Supports HTTP/1.0, HTTP/1.1, HTTP/2.0 protocols.

See docs here.

Configuration

Option default type description
method POST String POST, PUT
endpoint - String HTTP URL endpoint
headers - Array<String> Request header(s) "Key:Value" pairs
user-agent "fluvio/http-sink 0.1.0" String Request user-agent

Usage Example

This is an example of simple connector config file:

# config-example.yaml
meta:
  version: 0.1.0
  name: my-http-sink
  type: http-sink
  topic: http-sink-topic
http:
  endpoint: "http://127.0.0.1/post"
  headers:
    - "Authorization: token MySecretToken"
    - "Cache-Control: no-cache"

Transformations

Fluvio HTTP Sink Connector supports Transformations. Records can be modified before sending to endpoint.

The previous example can be extended to add extra transformations to outgoing records:

# config-example.yaml
meta:
  version: 0.1.0
  name: my-http-sink
  type: http-sink
  topic: http-sink-topic
http:
  endpoint: "http://127.0.0.1/post"
  headers:
    - "Authorization: token MySecretToken"
    - "Cache-Control: no-cache"
transforms:
  - uses: infinyon/jolt@0.1.0
    with:
      spec:
        - operation: shift
          spec:
            "result": "text"

In this case, additional transformation will be performed before records are sent the http endpoint. A json field called result will be renamed to text.

Read more about JSON to JSON transformations.

@drc-infinyon drc-infinyon added enhancement New feature or request and removed enhancement New feature or request labels Apr 17, 2023
@digikata
Copy link
Contributor

Sink is on hub, closing

$ fluvio hub conn list
  CONNECTOR                          Visibility   
  infinyon/http-sink@0.2.11          public     
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants