Record Stream Command

<< Click to Display Table of Contents >>

Navigation:  Development > Client > Redis/JSON >

Record Stream Command

 

Record Stream Commands are used to manage and consume DTS record streams. Record Stream Commands emitted by the Client can Open, Close or Advance a stream.

 

 

{

 "projectName" : "",

 "connectorEntry" : {

         "name" : ""

 },

 "collectionKey" : "",

 "operation" : 0,

 "filter" : <DTSPredicate>,

 "streamKey" : "",

 "batchSize" : 0

 

}

 

Attribute

Value

Note

projectName

The name of the project containing the resource

 

connectorEntry -> name

The name of the connector serving the resource

 

collectionKey

The name of the collection resource

 

operation

The operation to execute (1 - Open, 3 - Close, 5 - Advance)

 

filter

The DTSPredicate to use for building the query that generates the record stream

 

streamKey

The stream's identification key (not used for Open)

The streamKey is generated by the stream producers after opening the stream and is communicated to the Client in the response to the Open request.

batchSize

The number of records to be served (not used for Close)

 

 

 

 

{

 "streamId" : "",

 "moreToGet" : false,

 "channel" : "",

 "channelKey" : "",

 "records" : [

         <StreamRecord>

 ]

}

 

Attribute

Value

Note

streamId

The key or id of the stream

 

moreToGet

Whether the stream has more records after these

It is true or false for responses to Open and Advance Commands and it is null to signify a completed Close command

channel

The stream producer's channel to send subsequent Advance commands to (only for Open command responses)

 

channelKey

The AES encryption key for channel

Only for secured deployments

records

The list of requested records

Will be of the length set in the request's batchSize attribute or all that is left in the stream if less than that.

The format of the returned records is described by the respective CollectionResource

 

Information-icon_16px Record Stream Command Responses can be received even without making an explicit request. This happens whenever a stream times out and is closed.