@Override public void sendCommand(final NFVMessage nfvMessage, String tempDestination) { log.trace( "Sending NFVMessage with action: " + nfvMessage.getAction() + " to tempQueue: " + tempDestination); rabbitTemplate.setReplyQueue(new Queue(tempDestination)); rabbitTemplate.convertAndSend(tempDestination, gson.toJson(nfvMessage)); }
@Override public void sendCommand(final NFVMessage nfvMessage, final VnfmManagerEndpoint endpoint) { String destinationName = "nfvo." + endpoint.getType() + ".actions"; log.debug( "Sending NFVMessage with action: " + nfvMessage.getAction() + " to destination: " + destinationName); log.trace("nfvMessage is: " + nfvMessage); log.trace("gson is: " + gson); log.trace("RabbitTemplate is: " + rabbitTemplate); String json = null; try { json = gson.toJson(nfvMessage); } catch (Exception e) { e.printStackTrace(); } log.trace("Json is: " + json); rabbitTemplate.convertAndSend(destinationName, json); }