Produce Service

Overview

The produce service can be used to produce individual messages to a stream. The Rest Proxy supports multiple datatypes for key and value. Producing custom headers is not supported

API Specification

Endpoint

<baseurl>/stream/{environment}/{stream}

HTTP Method

POST

Path Variable

environment

The environment short name as specified in the Self Service definition

Path Variable

stream

The stream name as specified in the Self Service definition

Request

HTTP Header

Content-Type

application/json

HTTP Header

AXUAL-PRODUCER-UUID

(required) The unique producer instance id (example, 5 parallel producers would use different producer uuid)

HTTP Header

AXUAL-APPLICATION-ID

(required) The application id of the the producer application as specified in the Self Service

HTTP Header

AXUAL-APPLICATION-VERSION

(optional) The version of the the producer application

HTTP Header

AXUAL-ACKNOWLEDGE-STRATEGY

(optional) The acknowledgement waiting strategy to be used, NONE doesn’t wait, SINGLE waits for the target acknowledgement, ALL waits for the replication acknowledgement. Defaults to SINGLE

HTTP Header

AXUAL-ORDER-STRATEGY

(optional) The strategy for ordering, KEEPING will ensure delivery or the message in order. With LOSING messages can overtake other messages. Defaults to LOSING

HTTP Header

AXUAL-MAXIMUM-DELIVERY-TIME

(optional) How long does the call wait for delivery in milliseconds. Valid Range 50 - 60000, defaults to 30000

HTTP Header

AXUAL-LINGER-DELIVERY-TIME

(optional) How long does sending engine wait for extra messages in the batch. Valid range 0-2000 defaults to 50

HTTP Body

JSON Object

ProduceRequest

Response

HTTP Status Code

200

HTTP Header

Content-Type

application/json

HTTP Body

JSON Object

ProduceResponse

Error responses

HTTP Status Code

403

Not authorized to access the stream

HTTP Status Code

404

Stream and environment combination not found

HTTP Status Code

500

Generic Internal Error

HTTP Header

Content-Type

application/json

HTTP Body

JSON Object

AxualRestException