AMPS Source
The AMPSSource reads data from AMPS. It is a FLIP-27 source that enables developers to move data from AMPS into Flink. The source is responsible for receiving messages from AMPS, acknowledging messages from a queue, and deserializing messages.
The source follows the builder pattern to easily allow developers to only modify the source based on specific needs. The following is an example of the simplest AMPSSource that can be constructed. In this example, the uri is the AMPS connection URI, and the topic is the topic the source will use to subscribe to AMPS. The SimpleStringSchema is a deserialization schema that deserializes the payload of a message into a String.
AMPSSource<String> source = AMPSSource.<String>builder()
.setUri(uri)
.setTopic(topic)
.setDeserializationSchema(new SimpleStringSchema())
.build();
A valid AMPSSource requires a connection to AMPS, a topic to subscribe/query, and a deserialization schema to deserialize messages from AMPS. The methods above demonstrate the simplest way to provide these to the source through a URI string, a topic string, and a deserialization schema.