use of org.springframework.amqp.support.converter.MessageConversionException in project av-service by dvoraka.
the class AmqpComponent method onMessage.
@Override
public void onMessage(Message message) {
requireNonNull(message, "Message must not be null!");
AvMessage avMessage;
try {
avMessage = (AvMessage) messageConverter.fromMessage(message);
messageInfoService.save(avMessage, AvMessageSource.AMQP_COMPONENT_IN, serviceId);
} catch (MessageConversionException e) {
log.warn("Conversion error!", e);
return;
}
notifyListeners(listeners, avMessage);
}
use of org.springframework.amqp.support.converter.MessageConversionException in project av-service by dvoraka.
the class AmqpReplicationComponent method onMessage.
@Override
public void onMessage(Message message) {
log.debug("Receive: " + message);
ReplicationMessage replicationMessage;
try {
replicationMessage = (ReplicationMessage) messageConverter.fromMessage(message);
log.debug("Converted ({}): {}", nodeId, replicationMessage);
} catch (MessageConversionException e) {
log.warn("Conversion error!", e);
return;
}
listeners.forEach(listener -> listener.onMessage(replicationMessage));
}
Aggregations