List of usage examples for io.vertx.core.eventbus Message address
String address();
From source file:co.runrightfast.vertx.core.eventbus.EventBusUtils.java
License:Apache License
/** * Adds the following headers://from w w w.j a v a 2 s . com * * <ul> * <li>{@link MessageHeader#MESSAGE_ID} * <li>{@link MessageHeader#MESSAGE_TIMESTAMP} * <li>If the request message has a message id, then add header <b>{@link MessageHeader#MESSAGE_CORRELATION_ID}</b> using the request message's message id. * <li>{@link MessageHeader#FROM_ADDRESS} * </ul> * * @param requestMessage * @return DeliveryOptions */ static DeliveryOptions responseDeliveryOptions(@NonNull final Message requestMessage) { return withFromAddress( getMessageId(requestMessage).map(messageId -> withCorrelationId(deliveryOptions(), messageId)) .orElseGet(EventBusUtils::deliveryOptions), requestMessage.address()); }
From source file:org.mycontroller.standalone.eventbus.MessageStatusHandler.java
License:Apache License
@Override public void handle(Message<MessageStatus> event) { statusMessage = event.body();/*from w w w. ja va2 s. c o m*/ _logger.debug("Event received: [address:{}, body:{}]", event.address(), event.body()); }