public class SbApi
extends io.vertx.core.AbstractVerticle
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_BASE_ADDRESS
Basic vertx event bus address to received messages from
|
static int |
DEFAULT_EVENTBUS_TIMEOUT
Azure default lock time is 60s, so give 5 sec to respond
|
static java.lang.String |
DEFAULT_RECEIVED_MESSAGE_ADDRESS |
static java.lang.String |
DEFAULT_SEND_MESSAGE_ADDRESS |
static int |
DEFAULT_THROTTLING_MAX_REQUESTS |
| Constructor and Description |
|---|
SbApi() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(io.vertx.core.Vertx vertx,
io.vertx.core.Context context) |
void |
onSendMessage(io.vertx.core.eventbus.Message message)
Invoked by eventbus on @SEND_MESSAGE_ADDRESS
|
void |
readConfig(io.vertx.core.json.JsonObject config)
Supported config:
AZURE_SB_KEYNAME - servicebus access key name; system, env; required
AZURE_SB_KEY - servicebus access key; system, env; required
AZURE_SB_NAMESPACE - servicebus namespace; system, env; required
AZURE_SB_LISTEN_QUEUE_NAME - servicebus queue to listen; config, system, env; optional
EB_RECEIVE_ADDRESS - eventbus address to which received messages are sent; config, default; optional
EB_SEND_ADDRESS - eventbus address which is listened for messages to be sent to Azure ServiceBus; config, default; optional
AZURE_SB_INBOUND_DISPATCH_MODE - how verticle should dispatch received message; config, system, env; optional
|
void |
start() |
public static final java.lang.String DEFAULT_BASE_ADDRESS
public static final java.lang.String DEFAULT_SEND_MESSAGE_ADDRESS
public static final java.lang.String DEFAULT_RECEIVED_MESSAGE_ADDRESS
public static final int DEFAULT_EVENTBUS_TIMEOUT
public static final int DEFAULT_THROTTLING_MAX_REQUESTS
public void init(io.vertx.core.Vertx vertx,
io.vertx.core.Context context)
init in interface io.vertx.core.Verticleinit in class io.vertx.core.AbstractVerticlepublic void readConfig(io.vertx.core.json.JsonObject config)
config - verticle configpublic void start()
throws java.lang.Exception
start in class io.vertx.core.AbstractVerticlejava.lang.Exceptionpublic void onSendMessage(io.vertx.core.eventbus.Message message)
message - inbound message