use of org.openkilda.messaging.info.system.FeatureTogglesResponse in project open-kilda by telstra.
the class FeatureTogglesServiceImpl method getFeatureTogglesState.
@Override
public FeatureTogglePayload getFeatureTogglesState() {
String correlationId = UUID.randomUUID().toString();
FeatureToggleStateRequest teRequest = new FeatureToggleStateRequest();
CommandMessage requestMessage = new CommandMessage(teRequest, System.currentTimeMillis(), correlationId, Destination.TOPOLOGY_ENGINE);
messageProducer.send(topoEngTopic, requestMessage);
Message result = messageConsumer.poll(requestMessage.getCorrelationId());
FeatureTogglesResponse response = (FeatureTogglesResponse) validateInfoMessage(requestMessage, result, correlationId);
return mapper.toDto(response);
}
Aggregations