The latest version for DAS is WSO2 Data Analytics Server 3.2.0. View documentation for the latest release.
WSO2 Data Analytics Server is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.
||
Skip to end of metadata
Go to start of metadata

HTTP event publisher is used to publish events in XML, JSON or text formats via HTTP and HTTPS transports.

Creating a HTTP event publisher

For instructions on creating a HTTP event publisher, see Creating Alerts .

Configuring global properties

The following global properties can be set for the HTTP event publisher type in the <DAS_HOME>/repository/conf/input-event-adapters.xml file. These properties apply to all the publishers of the http type. If a global property available by default is removed, the default value of the property is considered.

Custom properties cannot be added as global properties.

Property KeyDescriptionData TypeDefault Value
minThreadThe minimum number of threads (including idle threads) that should be available in the thread pool at a given time.Integer8
maxThreadThe maximum number of threads (including idle threads) that should be available in the thread pool at a given time.Integer100
keepAliveTimeInMillisThe maximum number of milliseconds that idle threads should be kept alive when the total number of threads in the pool exceeds the number of cores in the machine.Integer20000
jobQueueSizeThe size of the queue that is used to hold events before they are forwarded to the event stream.Integer10000
defaultMaxConnectionsPerHostThe maximum number of connections allowed per host configuration.Integer50
maxTotalConnectionsThe maximum number of connections allowed overall.Integer1000

Configuring adapter properties

Specify the Static and Dynamic  Adapter Properties, when creating a HTTP event publisher using the management console as shown below.

HTTP event publisher

After entering the above adapter properties, select  the  Message Format   which you want to apply on the published events . Also, click  Advanced  to define custom output mappings based on the  Message Format  you selected. For more information on custom output mapping types, see Output Mapping Types .

You can also d efine the respective adapter properties of the event publisher based on the transport type within the  <to>  element of the event publisher configuration in the <PRODUCT_HOME>/repository/deployment/server/eventpublishers/ directory as follows.

<eventPublisher name="HTTPOutputEventAdapter" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventpublisher">
  ....................
  <to eventAdapterType="http">
    <property name="http.client.method">HttpPost</property>
    <property name="http.username">admin</property>
    <property name="http.proxy.host">yourhost</property>
    <property name="http.proxy.port">8080</property>
    <property encrypted="true" name="http.password">kuv2MubUUveMyv6GeHrXr9il59ajJIqUI4eoYHcgGKf/BBFOWn96NTjJQI+wYbWjKW6r79S7L7ZzgYeWx7DlGbff5X3pBN2Gh9yV0BHP1E93QtFqR7uTWi141Tr7V7ZwScwNqJbiNoV+vyLbsqKJE7T3nP8Ih9Y6omygbcLcHzg=</property>
    <property name="http.headers">header1: value1, header2: value2</property>
    <property name="http.url">http://localhost:8080</property>
  </to>
</eventPublisher>

The above adapter properties are described below.

Static adapter properties

Adapter PropertyDescriptionConfiguration file propertyExample
Proxy Host The proxy server host
http.proxy.host
yourhost
Proxy Port The proxy server port
http.proxy.port
8080
HTTP Client MethodThe standard HTTP client method
http.client.method

HttpPost

Dynamic adapter properties

Adapter PropertyDescriptionConfiguration file propertyExample
URL The target HTTP/HTTPS URL
http.url
http://yourhost:8080/service or https://yourhost:8080/service
Username HTTP BasicAuth username
http.username
admin
Password HTTP BasicAuth password
http.password
admin
Headers Custom HTTP headers
http.headers
header1: value1, header2: value2

Related samples

For more information on http event publisher type, see the following sample in WSO2 CEP Documentation.

  • No labels
  • Download PDF icon Download PDF
  • Download a PDF file of the documentation