Search in sources :

Example 1 with MessageException

use of org.openkilda.wfm.error.MessageException in project open-kilda by telstra.

the class WfmStatsParseBolt method handleInput.

@Override
public void handleInput(Tuple tuple) {
    if (active) {
        log.debug("Ingoing tuple: {}", tuple);
        Message message = (Message) tuple.getValueByField(MessageKafkaTranslator.FIELD_ID_PAYLOAD);
        try {
            InfoData data = getInfoData(message);
            if (data instanceof SwitchPortStatusData) {
                doParseSwitchPortsData((SwitchPortStatusData) data);
            }
        } catch (MessageException e) {
            log.error("Not an InfoMessage in queue message={}", message);
        }
    }
}
Also used : Message(org.openkilda.messaging.Message) SwitchPortStatusData(org.openkilda.messaging.info.stats.SwitchPortStatusData) MessageException(org.openkilda.wfm.error.MessageException) PortInfoData(org.openkilda.messaging.info.event.PortInfoData) InfoData(org.openkilda.messaging.info.InfoData)

Aggregations

Message (org.openkilda.messaging.Message)1 InfoData (org.openkilda.messaging.info.InfoData)1 PortInfoData (org.openkilda.messaging.info.event.PortInfoData)1 SwitchPortStatusData (org.openkilda.messaging.info.stats.SwitchPortStatusData)1 MessageException (org.openkilda.wfm.error.MessageException)1