use of com.yahoo.messagebus.routing.ErrorDirective in project vespa by vespa-engine.
the class DocumentOperationMessageV3 method newErrorMessage.
static DocumentOperationMessageV3 newErrorMessage(String operationId, Exception exception) {
Message feedErrorMessageV3 = new FeedErrorMessage(operationId);
DocumentOperationMessageV3 msg = new DocumentOperationMessageV3(operationId, feedErrorMessageV3);
Hop hop = new Hop();
hop.addDirective(new ErrorDirective(Exceptions.toMessageString(exception)));
Route route = new Route();
route.addHop(hop);
feedErrorMessageV3.setRoute(route);
return msg;
}
use of com.yahoo.messagebus.routing.ErrorDirective in project vespa by vespa-engine.
the class Feeder method newErrorMessage.
private Tuple2<String, Message> newErrorMessage(String operationId, Exception e) {
Message m = new FeedErrorMessage(operationId);
Tuple2<String, Message> msg = new Tuple2<>(operationId, m);
Hop hop = new Hop();
hop.addDirective(new ErrorDirective(Exceptions.toMessageString(e)));
Route route = new Route();
route.addHop(hop);
m.setRoute(route);
return msg;
}
Aggregations