Skip to content

suhothayan/docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

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."

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published