sendMessageAndSupplyHandler
public static <T> void sendMessageAndSupplyHandler(String methodId,
String targetId,
Object message,
ThrowableFutureBiConsumer<io.vertx.core.AsyncResult<io.vertx.core.eventbus.Message<Object>>,T> function,
io.vertx.core.eventbus.DeliveryOptions requestDeliveryOptions,
io.vertx.core.Vertx vertx,
java.util.function.Consumer<Throwable> errorMethodHandler,
io.vertx.core.eventbus.Message<Object> requestMessage,
Encoder encoder,
java.util.function.Consumer<Throwable> errorHandler,
ThrowableErrorConsumer<Throwable,T> onFailureRespond,
io.vertx.core.eventbus.DeliveryOptions responseDeliveryOptions,
int retryCount,
long timeout,
long circuitBreakerTimeout,
RecursiveExecutor executor,
RetryExecutor retryExecutor)
Send event-bus message and process the result in the passed function for the execution chain
- Type Parameters:
T - the type of response
- Parameters:
methodId - the method identifier
targetId - the event-bus target id
message - the message to send
function - the function to process the result message
requestDeliveryOptions - the event-bus delivery options
vertx - the vertx instance
errorMethodHandler - the error-method handler
requestMessage - the request message to respond after chain execution
encoder - the encoder to serialize the response object
errorHandler - the error handler
onFailureRespond - the function that takes a Future with the alternate response value in case of failure
responseDeliveryOptions - the delivery options for the event response
retryCount - the amount of retries before failure execution is triggered
timeout - the amount of time before the execution will be aborted
circuitBreakerTimeout - the amount of time before the circuit breaker closed again
executor - the typed executor to process the chain
retryExecutor - the typed retry executor of the chain