HTTP event receiver is an internal event receiver that comes with WSO2 products which is used to receive events in XML, JSON or Text formats via HTTP, HTTPS, and local transports. By default it uses the following URLs to retrieve events.
- For super tenants:
...
https://localhost:9443/endpoints/<EVENT_RECEIVER_NAME>
- For other tenants:
http://localhost:9763/endpoints/t/<TENANT_DOMAIN>/<EVENT_RECEIVER_NAME>
or
https://localhost:9443/endpoints/t/<TENANT_DOMAIN>/<EVENT_RECEIVER_NAME>
Table of Contents | ||
---|---|---|
|
Creating a HTTP event receiver
For instructions on creating a HTTP event receiver, see Receiving EventsConfiguring Event Receivers .
Configuring global properties
The following global properties can be set for the HTTP event receiver type in the <DAS_HOME>/repository/conf/input-event-adapters.xml
file. These properties apply to all the receivers of the HTTP
type. If a global property available by default is removed, the default value of the property is considered.
Property Key | Description | Data Type | Default Value |
---|---|---|---|
minThread | The minimum number of threads (including idle threads) that should be available in the thread pool at a given time. | Integer | 8 |
maxThread | The maximum number of threads (including idle threads) that should be available in the thread pool at a given time. | Integer | 100 |
keepAliveTimeInMillis | The 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. | Integer | 20000 |
jobQueueSize | The size of the queue that is used to hold events before they are forwarded to the event stream. | Integer | 10000 |
Configuring adapter properties
Specify the Adapter Properties, when creating a HTTP event receiver using the management console as shown below.
Info |
---|
After entering the transport type in adapter properties, select the Event Stream to which you want to map the incoming events, and the Message Format which you want to apply on the receiving events . Also, click Advanced to define custom input mappings based on the Message Format you selected. For more information on custom input mapping types, see Input Mapping Types . |
You can also d efine the respective adapter properties of the event receiver based on the transport type within the <from>
element of the event receiver configuration in the <PRODUCT_HOME>/repository/deployment/server/eventreceivers/
directory as follows.
Code Block |
---|
<eventReceiver name="HTTPInputEventAdapterhttpReceiver" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver"> <from eventAdapterType="http"> <property name="transports">https</property> </from> ............................ </eventReceiver> |
...
Adapter property | Description | Configuration file property | Example |
---|---|---|---|
Transport(s) | Transport type via which the events are received. | transports | https |
Related samples
For more information on http
event receiver type, see the following samples in WSO2 CEP Documentation.