Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 1.02 KB

outcoming_message_format.md

File metadata and controls

30 lines (25 loc) · 1.02 KB

HTTP exchange outcome format

When the Sink HTTP connector is configured to publish messages (HTTPExchange) in the in memory queue (via the publish.to.in.memory.queue option set to true), The HTTP Source Connector can be configured, to receive these messages and send them to a success or error topic. These messages (HTTPExchange), are Struct messages.

Struct format

public class HTTPExchange {
    public final static Schema SCHEMA = SchemaBuilder
        .struct()
        .name(HttpExchange.class.getName())
        .version(HTTP_EXCHANGE_VERSION)
        //metadata fields
        .field(DURATION_IN_MILLIS, Schema.INT64_SCHEMA)
        .field(MOMENT, Schema.STRING_SCHEMA)
        .field(ATTEMPTS, Schema.INT32_SCHEMA)
        //request
        .field(REQUEST, HttpRequest.SCHEMA)
        // response
        .field(RESPONSE, HttpResponse.SCHEMA)
        .schema();
}

JSON Schema format

JSON Schema Format