use of org.openkilda.messaging.AliveResponse in project open-kilda by telstra.
the class SpeakerToNetworkProxyBolt method proxyInfoMessage.
@Override
protected void proxyInfoMessage(String key, InfoMessage envelope) {
emitAliveEvidence(envelope);
InfoData payload = envelope.getData();
if (payload instanceof AliveResponse) {
emitRegionNotification(envelope.getRegion(), (AliveResponse) payload);
} else if (payload instanceof SwitchInfoData) {
emitNetworkNotification(envelope.getRegion(), (SwitchInfoData) payload);
} else if (payload instanceof NetworkDumpSwitchData) {
emitNetworkNotification(envelope.getRegion(), (NetworkDumpSwitchData) payload);
} else if (payload instanceof PortInfoData) {
emitNetworkNotification(envelope.getRegion(), (PortInfoData) payload);
} else {
super.proxyInfoMessage(key, envelope);
}
}
use of org.openkilda.messaging.AliveResponse in project open-kilda by telstra.
the class RecordHandler method doAliveRequest.
private void doAliveRequest(CommandMessage message) {
// TODO(tdurakov): return logic for failed amount counter
int totalFailedAmount = getKafkaProducer().getFailedSendMessageCounter();
getKafkaProducer().sendMessageAndTrack(context.getKafkaTopoDiscoTopic(), new InfoMessage(new AliveResponse(context.getRegion(), totalFailedAmount), System.currentTimeMillis(), message.getCorrelationId(), context.getRegion()));
}
Aggregations