final GraphiteSender graphite;
if ("rabbitmq".equals(transport)) {
ConnectionFactory connectionFactory = getPropertyRef(CONNECTION_FACTORY_REF, ConnectionFactory.class);
String exchange = getProperty(EXCHANGE);
graphite = new GraphiteRabbitMQ(connectionFactory, exchange);
}
else {
final String hostname = getProperty(HOST);
final int port = getProperty(PORT, Integer.TYPE);