API pipeline - RapturePlatform/Rapture GitHub Wiki
The Pipeline Api is used to configure the Rapture System pipeline for running tasks within a cluster of Rapture Servers.
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
void retVal = pipelineApi.removeServerCategory(category);
retVal = baseAPI.doPipeline_RemoveServerCategory(category);
Entitlement: /admin/main
Deletes a given category.
Parameter | Type | Description |
---|---|---|
category | String |
Type | Description |
---|---|
void |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
List<String> retVal = pipelineApi.getServerCategories();
retVal = baseAPI.doPipeline_GetServerCategories();
Entitlement: /admin/main
List server categories.
This function takes no parameters.
Type | Description |
---|---|
List |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
List<CategoryQueueBindings> retVal = pipelineApi.getBoundExchanges(category);
retVal = baseAPI.doPipeline_GetBoundExchanges(category);
Entitlement: /admin/main
Get bound exchanges for a category
Parameter | Type | Description |
---|---|---|
category | String |
Type | Description |
---|---|
List |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
void retVal = pipelineApi.deregisterPipelineExchange(name);
retVal = baseAPI.doPipeline_DeregisterPipelineExchange(name);
Entitlement: /admin/main
Removes an exchange.
Parameter | Type | Description |
---|---|---|
name | String |
Type | Description |
---|---|
void |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
List<String> retVal = pipelineApi.getExchanges();
retVal = baseAPI.doPipeline_GetExchanges();
Entitlement: /admin/main
Retrieves all registered exchanges.
This function takes no parameters.
Type | Description |
---|---|
List |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
RaptureExchange retVal = pipelineApi.getExchange(name);
retVal = baseAPI.doPipeline_GetExchange(name);
Entitlement: /admin/main
Retrieves an exchange object by name.
Parameter | Type | Description |
---|---|---|
name | String |
Type | Description |
---|---|
RaptureExchange |
*A RaptureExchange is the coordination point for a task based pipeline.
Clients put RapturePipelineTask instances onto an exchange, which then routes that task to a set of queues that are then consumed.
This class defines the config of an exchange *
Field | Type |
---|---|
domain | String |
name | String |
exchangeType | RaptureExchangeType |
queueBindings | List(RaptureExchangeQueue) |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
void retVal = pipelineApi.publishMessageToCategory(task);
retVal = baseAPI.doPipeline_PublishMessageToCategory(task);
Entitlement: /admin/main
Publishes a message. This message will be published to the category specified in the RapturePipelineTask object. If no category is specified, an error is thrown. This type of message should be handled by only one of the servers belonging to this category; in other words, it is not a broadcast.
Parameter | Type | Description |
---|---|---|
task | RapturePipelineTask |
Type | Description |
---|---|
void |
Represents a task that has been submitted to the Rapture pipeline. Includes the task's status, type, and categories associated with it.
Field | Type |
---|---|
status | PipelineTaskStatus |
taskType | PipelineTaskType |
priority | int |
categoryList | List |
taskId | String |
content | String |
contentType | String |
epoch | Long |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
void retVal = pipelineApi.broadcastMessageToCategory(task);
retVal = baseAPI.doPipeline_BroadcastMessageToCategory(task);
Entitlement: /admin/main
This message will be broadcasted to all servers belonging to the category specified in the RapturePipelineTaskobject. If no category is specified, an error is thrown.
Parameter | Type | Description |
---|---|---|
task | RapturePipelineTask |
Type | Description |
---|---|
void |
Represents a task that has been submitted to the Rapture pipeline. Includes the task's status, type, and categories associated with it.
Field | Type |
---|---|
status | PipelineTaskStatus |
taskType | PipelineTaskType |
priority | int |
categoryList | List |
taskId | String |
content | String |
contentType | String |
epoch | Long |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
void retVal = pipelineApi.broadcastMessageToAll(task);
retVal = baseAPI.doPipeline_BroadcastMessageToAll(task);
Entitlement: /admin/main
This message will be broadcasted to all servers connected to the pipeline system.
Parameter | Type | Description |
---|---|---|
task | RapturePipelineTask |
Type | Description |
---|---|
void |
Represents a task that has been submitted to the Rapture pipeline. Includes the task's status, type, and categories associated with it.
Field | Type |
---|---|
status | PipelineTaskStatus |
taskType | PipelineTaskType |
priority | int |
categoryList | List |
taskId | String |
content | String |
contentType | String |
epoch | Long |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
PipelineTaskStatus retVal = pipelineApi.getStatus(taskId);
retVal = baseAPI.doPipeline_GetStatus(taskId);
Entitlement: /admin/main
Gets the status for a published RapturePipelineTask.
Parameter | Type | Description |
---|---|---|
taskId | String |
Type | Description |
---|---|
PipelineTaskStatus |
Contains details about the current tasks on a pipeline.
Field | Type |
---|---|
currentState | PipelineTaskState |
taskId | String |
relatedTaskId | String |
creationTime | Date |
startExecutionTime | Date |
endExecutionTime | Date |
suspensionCount | int |
output | List(String) |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
List<RapturePipelineTask> retVal = pipelineApi.queryTasks(query);
retVal = baseAPI.doPipeline_QueryTasks(query);
Entitlement: /admin/main
Queries for pipeline statuses.
Parameter | Type | Description |
---|---|---|
query | String |
Type | Description |
---|---|
List |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
List<RapturePipelineTask> retVal = pipelineApi.queryTasksOld(query);
retVal = baseAPI.doPipeline_QueryTasksOld(query);
Entitlement: /admin/main
Queries for pipeline statuses.
Parameter | Type | Description |
---|---|---|
query | TableQuery |
Type | Description |
---|---|
List |
Describes a query made against a table.
Field | Type |
---|---|
fieldTests | List(TableSelect) |
fieldReturns | List(String) |
sortFields | List(TableColumnSort) |
skip | int |
limit | int |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
Long retVal = pipelineApi.getLatestTaskEpoch();
retVal = baseAPI.doPipeline_GetLatestTaskEpoch();
Entitlement: /admin/main
On the task information, get the latest epoch (the maximum message id).
This function takes no parameters.
Type | Description |
---|---|
Long |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
void retVal = pipelineApi.drainPipeline(exchange);
retVal = baseAPI.doPipeline_DrainPipeline(exchange);
Entitlement: /admin/main
Drain an exchange - remove all messages.
Parameter | Type | Description |
---|---|---|
exchange | String |
Type | Description |
---|---|
void |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
void retVal = pipelineApi.registerExchangeDomain(domainURI, config);
retVal = baseAPI.doPipeline_RegisterExchangeDomain(domainURI, config);
Entitlement: /admin/main
Registers a new exchange domain.
Parameter | Type | Description |
---|---|---|
domainURI | String | |
config | String |
Type | Description |
---|---|
void |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
void retVal = pipelineApi.deregisterExchangeDomain(domainURI);
retVal = baseAPI.doPipeline_DeregisterExchangeDomain(domainURI);
Entitlement: /admin/main
Removes an exchange domain.
Parameter | Type | Description |
---|---|---|
domainURI | String |
Type | Description |
---|---|
void |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
List<String> retVal = pipelineApi.getExchangeDomains();
retVal = baseAPI.doPipeline_GetExchangeDomains();
Entitlement: /admin/main
Retrieves all registered exchange domains.
This function takes no parameters.
Type | Description |
---|---|
List |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
void retVal = pipelineApi.setupStandardCategory(category);
retVal = baseAPI.doPipeline_SetupStandardCategory(category);
Entitlement: /admin/main
Sets up the default queue-exchanges and bindings for a given category.
Parameter | Type | Description |
---|---|---|
category | String |
Type | Description |
---|---|
void |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
Map<String,Object> retVal = pipelineApi.makeRPC(queueName, fnName, params, timeoutInSeconds);
retVal = baseAPI.doPipeline_MakeRPC(queueName, fnName, params, timeoutInSeconds);
Entitlement: /user/call
Make an RPC call using a pair of queues on the pipeline of the default exchange. I notice that the exchange is removed from the above call which seems to be a bit of a regression
Parameter | Type | Description |
---|---|---|
queueName | String | |
fnName | String | |
params | Map<String,Object> | |
timeoutInSeconds | Long |
Type | Description |
---|---|
Map<String,Object> |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
void retVal = pipelineApi.createTopicExchange(domain, exchange);
retVal = baseAPI.doPipeline_CreateTopicExchange(domain, exchange);
Entitlement: /admin/main
Create a topic exchange that can be used to pub/sub on
Parameter | Type | Description |
---|---|---|
domain | String | |
exchange | String |
Type | Description |
---|---|
void |
HttpPipelineApi pipelineApi = new HttpPipelineApi(loginApi);
void retVal = pipelineApi.publishTopicMessage(domain, exchange, topic, message);
retVal = baseAPI.doPipeline_PublishTopicMessage(domain, exchange, topic, message);
Entitlement: /admin/main
Publish on topic exchange (Subscription has to go low level)
Parameter | Type | Description |
---|---|---|
domain | String | |
exchange | String | |
topic | String | |
message | String |
Type | Description |
---|---|
void |