public final class MicroserviceApp extends co.cask.cdap.api.app.AbstractApplication<MicroserviceDefinition>
MicroserviceApp is CDAP Application that configures a
microservice as a CDAP Worker. This application is specialized or configured
using a plugin of type 'microservice'.
A microservice is constructed using a CDAP worker with the inbound events
consumed from a TMS (Transactional Message Service) topic, processed and
then optionally passed to the outbound queue.
TMS provides a reliable queue for passing messages between microservices.
Following is the configuration that configures this application.
{
"artifact" : {
"name" : "microservice-app",
"version" : "1.1.1",
"scope" : "user"
},
"config" : {
"version" : 1,
"id" : "GeoFenceNotifier",
"description" : "Description for the microservice.",
"plugin" : {
"name" : "abc",
"version" : "1.0.0",
"scope" : "user"
}
"configuration" : {
"instances" : 1,
"vcores" : 1,
"memory" : 512,
"endpoints" : {
"in" : [
{
"type" : "tms",
"name" : "raw-tms-queue",
"properties" : {
"topic" : "raw-tms",
"namespace" : "default"
}
},
{
"type" : "sqs",
"name" : "sqs-channel",
"properties" : {
"queue-name" : "my-sqs-queue",
"access-id" : "my-access-id",
"access-key" : "my-access-key",
"region" : "region-name"
}
}
],
"out" : [
{
"type" : "tms",
"name" : "processed-tms-queue",
"properties" : {
"topic" : "processed-tms",
"namespace" : "default"
}
}
]
},
"properties" : {
"a" : "b",
"c" : "d"
}
}
}
}
MicroserviceWorker| Constructor and Description |
|---|
MicroserviceApp() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure()
Configures this application based on the configuration passed to this application.
|
addFlow, addMapReduce, addService, addService, addSpark, addWorker, addWorkflow, buildSchedule, configure, getConfig, getConfigurer, getContext, schedule, scheduleWorkflow, scheduleWorkflow, setDescription, setNameusePlugin, usePlugin, usePluginClass, usePluginClasspublic void configure()
configure in class co.cask.cdap.api.app.AbstractApplication<MicroserviceDefinition>Copyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.