Skip to main content
Version: Current

HTTP Endpoint

Mode: Streaming

Description

HTTP-endpoint is a streaming only source component. An external system has to invoke this endpoint to insert event into the scenario. If you just want to experiment, you can use curl command (available in all Unix variants) to call the http endpoint; the curl command is also available in PowerShell on Windows. For more advanced use cases use your favorite http client library.

Parameters and configuration

NameDescription
EndpointEndpoint URL; in the most common use case you need to generate it - press the Generate New Endpoint button
Content typeJSON - Nussknacker will use user provided Data sample to infer schema of ingested events. Use PLAIN if you do not want this behavior. See also Additional considerations.
Data sampleSee above and Additional considerations.

Advanced parameters

NameDescription
Event timeExpression which evaluates to the time when the event was created. For Kafka sources, creation timestamp is available in the Kafka event and can be accessed in SpEL as #inputMeta.timestamp. Check here.
Max out-of-ordernessThe maximum amount of time an event is allowed to be late before being ignored when computing the result for time-based stream transformations: aggregates in time windows and joins. To read more about this mechanism see Flink documentation.
IdlenessThe time period after which partition is marked as idle if no events are received from it. To read more about this mechanism see Flink documentation.

Additional considerations

The table below shows how Nussknacker functionality differs in the case of JSON and PLAIN Content type.

NameJSONPLAIN
Schema inferenceNussknacker will infer schema (information on the content of the message) from the provided Data sample.The whole data payload will be of type String.
HintsField names will be hinted.N/A
Field accessYou can use both #input.field-name notation and dynamic navigation (#input[field-name]).Use #CONV.toJson function to convert your payload to JSON and then use dynamic field navigation.
Live dataOnly fields 'declared' in Data sample are shown.Whole event content is shown.