<< Click to Display Table of Contents >> Navigation: Development > Client > Redis/JSON > Execute Remote Command |
Execute Remote Commands are used to invoke routines. The Client addresses the requests to the Controller and the responses come from the serving producers.
Request |
|
Outgoing |
|
Target channel |
"DTS:MIDDLEWARE:CHANNEL" |
Payload Class Key |
"DTS_EXECUTE_REMOTE_COMMAND" |
{
"projectName" : "",
"connectorEntry" : {
"name" : ""
},
"remoteKey" : "",
"parameters" : {
"payloadMetadata" : {
"payloadClassKey" : "",
"arrayPayload" : false
},
"payloadJSON" : ""
}
}
Attribute |
Value |
Note |
||
projectName |
The name of the project containing the resource |
|
||
connectorEntry -> name |
The name of the connector serving the resource |
|
||
remoteKey |
The name of the remote call resource |
|
||
parameters |
A payload container to wrap the remote call's input parameters |
|
||
|
payloadMetadata |
The metadata for the payload |
|
|
|
payloadClassKey |
The type key of the remote's arguments wrapper class |
The TypeDescriptor for this type key can be found in the RemoteCallDescriptor corresponding to the remote call. |
|
|
arrayPayload |
Always false as the arguments are wrapped in a single object |
|
|
|
payloadJSON |
The JSON representing the arguments wrapper object in the format referenced by payloadClassKey |
The payload json is actually wrapped in a string. This means that all " (double quote) characters need to be escaped. |
Response |
|
Incoming |
|
Target channel |
Request replyToChannel |
Payload Class Key |
The type key of the remote call's results wrapper (described in the RemoteCallDescriptor) or "DTS_STREAM_RECORD_CONTAINER" |
If it is a regular routine, the response will directly contain the outputs of the routine, wrapped in an object with each output as a named attribute.
If the routine returns a stream, the response will be the same a Record Stream Command Response, containing the details of the resulting stream.