This section explains the HTTP adapter communication method.
An HTTP adapter uses CEP service Web server features to receive event data.
The end point address (URL) is as follows:
http://cepServerHostName/cepEngineNameFrontServerService/HttpReceiver
Example
In this example, the CEP Server host name is "bdcep", and the CEP engine name is "CEPengine1".
http://bdcep/CEPengine1FrontServerService/HttpReceiver
Use an HTTP request to send event data to the CEP Server.
Specify the CEP engine that posts the event data.
POST path HTTP/version
The path part of the end point address.
The HTTP protocol version.
Point
BDCEP supports HTTP protocol versions 1.0 and 1.1.
Example
If the CEP engine name is "CEPengine1":
POST /CEPengine1FrontServerService/HttpReceiver HTTP/1.1
Specify event data information as follows:
Send information | Specification method | Specification example |
---|---|---|
Event data format | Specify in the TYPE header | If the event data is in CSV format: TYPE: CSV |
Event type ID | Specify in the EVENT-TYPE-ID header | If the event type (development asset ID of the event type definition) is EVENTTYPE_01: EVENT-TYPE-ID: EVENTTYPE_01 |
Character set | Specify in the Content-Type header (Can be omitted for UTF-8) | If the event data encoding is Shift JIS, and the format is CSV: Content-Type: text/plain; charset=Shift_JIS If the event data encoding is Japanese-language EUC, and the format is XML: Content-Type: text/xml; charset=EUC-JP |
Note
If a character set is not specified, the encoding is not converted. Therefore, even if the encoding of the sent event data is not UTF-8, the high-speed filter and complex event processing operate interpreting the input event as being in UTF-8.
Specify the event data content.
Example
The send message for the following scenario is shown below:
CEP Server host name: bdcep
CEP engine name: CEPengine1
Event data format: CSV format
Event type ID: EVENTTYPE_01
Character set: Shift JIS
POST /CEPengine1FrontServerService/SoapReceiverService HTTP/1.1
Host: bdcep
TYPE: CSV
EVENT-TYPE-ID: EVENTTYPE_01
Content-Type: text/plain; charset=Shift_JIS
Content-Length: nnnn
MEM0001,1010,1
After an HTTP request is sent, a response message posted from the CEP Server is received.
The HTTP response and the information posted in the message body are shown below.
An HTTP response message is posted.
HTTP/version statusCode supplementaryMessage
HTTP protocol version.
HTTP request result.
Supplementary message in accordance with the status code.
Example
If event data send ended normally:
HTTP/1.1 200 OK
A message showing the HTTP adapter processing results is posted.
Example
If event data send ended normally:
Code=0 Message=Message sending is completed normally.
Point
When an error occurs, a message is output to the syslog and the engine log. Refer to "3.4 Error Processing" for information on error processing.
Various messages, in accordance with the processing result, are as follows:
Processing result | Message (*1) |
---|---|
Normal end | 200 OK |
Code=0 Message=Sending message completed normally. | |
None | |
CEP Server not running | 200 OK |
Code=-1000 Message=Server is not Running. | |
cep10300w: FrontServer is not running. Event is aborted. EngineId=cepEngineName | |
Format error The event data format does not exist. | 400 Bad Request |
Code=-100 Message=Event type format is not defined. | |
cep10306e: Event Type Format is not defined. EngineId=cepEngineName | |
Format error The event type ID does not exist. | 400 Bad Request |
Code=-300 Message=Event type id is not defined. | |
cep10305e: Event Type ID is not defined. EngineId=cepEngineName | |
Format error A format other than CSV or XML is specified for the event data format. | 400 Bad Request |
Code=-400 Message=Unknown event format [eventFormat]. | |
cep10114e: Unknown Event format. EngineId=cepEngineName, format=eventFormat | |
Format error The event data size exceeds 32,000,000 bytes. | 400 Bad Request |
Code=-900 Message=Bad Event data size [eventDataSize]. | |
cep10310e: Event Data Size is over. EngineId=cepEngineName, Size=eventDataSize | |
Settings content discrepancy The event type ID is not known. | 400 Bad Request |
Code=-500 Message=Unknown event type id [eventType]. | |
cep10108e: Event type is not found. EngineId=cepEngineName, eventType=eventType | |
Settings content discrepancy The event data format does not match the deployed event type definition. | 400 Bad Request |
Code=-700 Message=It differs from the registered format [eventFormat]. | |
cep10116e: It differs from the registered format. EngineId=cepEngineName, format=eventFormat | |
Format error The character set is not known. | 415 Unsupported Media Type |
Code=-600 Message=Charset is Abnormal [characterSetName]. | |
cep10304e: Charset Name is abnormal. EngineId=cepEngineName,CharsetName=characterSetName | |
Processing result error Log output processing failed. | 500 Internal Server Error |
Code=-200 Message=Logging failed. | |
cep10401e: The Log was not able to be output. EngineId=cepEngineName, EVENT=receivedEvent, ERRORINFO=internalInformation Note: Newlines in received events are converted to  before output. If an event exceeds the length that can be output to the syslog, only partial event information is output to the syslog. | |
Busy status The CEP Server is temporarily or permanently overloaded. | 503 Service Unavailable |
Code=-800 Message=Server is busy now. | |
cep10301w: FrontServer is busy. Event is aborted. EngineId=cepEngineName or cep10302e: FrontServer is continuously busy. Event is aborted. EngineId=cepEngineName |
*1: The contents of each row are as follows:
Top row: HTTP status code + supplementary message
Middle row: HTTP response message body (variable information shown in italic)
Bottom row: Message output to syslog and engine log (variable information shown in italic)
This section explains notes related to the use of the HTTP adapter.
Number of simultaneous connections
If multiple event sender applications connect to an HTTP adapter simultaneously, the maximum number of simultaneous connections to the HTTP adapter might be reached. If so, the suspended status temporarily occurs for subsequent connection requests from event sender applications.
Since the HTTP adapter responds to suspended status connection requests in accordance with the processing of the received event data, no action is required by the event sender application.
Information
The maximum number of simultaneous connections to an HTTP adapter is 50.
Since SOAP adapters and HTTP adapters share use of the Web server features of the CEP Server, the actual number of connections is the combined number of SOAP adapter and HTTP adapter connections.
Communication protocol
The HTTP adapter communication protocols do not support HTTPS (HTTP over SSL/TLS).