GithubHelp home page GithubHelp logo

docs's Introduction

Sink

http

@sink(type="http", publisher.url="<STRING>", basic.auth.username="<STRING>", basic.auth.password="<STRING>", client.truststore.path="<STRING>", client.truststore.pass="<STRING>", @map(type='type', @payload('{{payloadBody}}')))
Extension Type Sink
Description This is description for http sink extension. This extension publish the http
events in any method types such as POST, GET, PUT, DELETE  via http or https
protocols. As the additional features this component can provide basic
authentication as well as user can publish events using custom client truststore
files when publishing events via https protocol. And also user can add any
number of headers for each event dynamically.
System Parameters
  1. Name latency.metrics.enabled
    Description Netty transportation property.
    Default Value true
    Possible Parameters N/A
  2. Name server.bootstrap.socket.timeout
    Description Netty transportation property.
    Default Value 15
    Possible Parameters N/A
  3. Name client.bootstrap.socket.timeout
    Description Netty transportation property.
    Default Value 15
    Possible Parameters N/A
  4. Name default.host
    Description The default host.
    Default Value 0.0.0.0
    Possible Parameters N/A
  5. Name default.port
    Description The default port.
    Default Value 9763
    Possible Parameters N/A
  6. Name default.protocol
    Description The default protocol.
    Default Value http
    Possible Parameters N/A
  7. Name https.truststore.file
    Description The default truststore file path.
    Default Value ${carbon.home}/conf/security/client-truststore.jks
    Possible Parameters N/A
  8. Name https.truststore.pass
    Description The default truststore password.
    Default Value wso2carbon
    Possible Parameters N/A
Examples
  1. @sink(type='http',publisher.url='http://localhost:8009', method='{{method}}',headers='{{headers}}', @map(type='xml' , @payload('{{payloadBody}}')))define stream FooStream (payloadBody String, method string, headers string);
    
    Expected input should be in following format:{<events>
        <event>
       
    <symbol>WSO2</symbol>
            <price>55.6</price>
           
    <volume>100</volume>
       
    </event>
    </events>
    ,POSTContent-Length:24#Content-Location:USA#Retry-After:120}Above
    configuration will do a default XML input mapping which will generate as below
    ~Output payload<events>
        <event>
           
    <symbol>WSO2</symbol>
            <price>55.6</price>
           
    <volume>100</volume>
        </event>
    </events>
    ~Output
    headersContent-Length:24,Content-Location:USA,Retry-After:120,Content-Type:application/xml~Output
    propertyHTTP_METHOD:POST If you need to use basic authentication, the
    basic.auth.enabled parameter must be set to true. This would also require
    values to be specified for the basic.auth.username and basic.auth.password
    parameters (e.g., basic.auth.username='userName' and
    basic.auth.password='passWord'). As a result,the output will also contain the
    Authorization header."

Source

http

@source(type="http", receiver.url="<STRING>", basic.auth.enabled="<STRING>", worker.count="<STRING>", server.bootstrap.boss.group.size="<STRING>", server.bootstrap.worker.group.size="<STRING>", @map(type='type', @payload('{{payloadBody}}')))
Extension Type Source
Description The HTTP source receives POST requests via HTTP or HTTPS in textXML or
JSON format. If required, you can enable basic authentication to ensure that
events are received only from users who are authorized to access WSO2 DAS.
System Parameters
  1. Name latency.metrics.enabled
    Description Netty transportation property.
    Default Value true
    Possible Parameters N/A
  2. Name server.bootstrap.socket.timeout
    Description Netty transportation property.
    Default Value 15
    Possible Parameters N/A
  3. Name client.bootstrap.socket.timeout
    Description Netty transportation property.
    Default Value 15
    Possible Parameters N/A
  4. Name default.host
    Description The default host.
    Default Value 0.0.0.0
    Possible Parameters N/A
  5. Name default.port
    Description The default port.
    Default Value 9763
    Possible Parameters N/A
  6. Name default.protocol
    Description The default protocol.
    Default Value http
    Possible Parameters N/A
  7. Name https.keystore.file
    Description The default keystore file path.
    Default Value ${carbon.home}/conf/security/wso2carbon.jks
    Possible Parameters N/A
  8. Name https.keystore.pass
    Description The default keystore pass.
    Default Value wso2carbon
    Possible Parameters N/A
  9. Name https.cert.pass
    Description The default cert pass.
    Default Value wso2carbon
    Possible Parameters N/A
Examples
  1. @source(type='http', receiver.url='http://localhost:9055/endpoints/RecPro', @map(type='xml'))
    define stream FooStream (symbol string, price float, volume long);
    
    Above source configuration performs a default XML input mapping. The expected
    input is as follows:<events>
        <event>
           
    <symbol>WSO2</symbol>
            <price>55.6</price>
           
    <volume>100</volume>
        </event>
    </events>
    If basic authentication is
    enabled via the basic.auth.enabled='true setting, each input event is also
    expected to contain the Authorization:'Basic encodeBase64(username:Password)'
    header."

docs's People

Contributors

rukshiw avatar suhothayan avatar

Watchers

 avatar  avatar

Forkers

rukshiw

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.