use of org.openkilda.floodlight.utils.NewCorrelationContextRequired in project open-kilda by telstra.
the class SwitchManager method receive.
/**
* {@inheritDoc}
*/
@Override
@NewCorrelationContextRequired
public Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx) {
logger.debug("OF_ERROR: {}", msg);
// TODO: track xid for flow id
if (OFType.ERROR.equals(msg.getType())) {
ErrorMessage error = new ErrorMessage(new ErrorData(ErrorType.INTERNAL_ERROR, ((OFErrorMsg) msg).getErrType().toString(), null), System.currentTimeMillis(), CorrelationContext.getId(), Destination.WFM_TRANSACTION);
// TODO: Most/all commands are flow related, but not all. 'kilda.flow' might
// not be the best place to send a generic error.
producerService.sendMessageAndTrackWithZk("kilda.flow", error);
}
return Command.CONTINUE;
}
Aggregations