public void alert(String key, String json) {
String routingKey;
if(key == null) routingKey = getAlertRoutingKey();
else routingKey = getAlertRoutingKey() + key;
try {
FqMessage msg = new FqMessage();
msg.setRoute(routingKey.getBytes());
msg.setExchange(getAlertExchangeName().getBytes());
msg.setPayload(json.getBytes());
for(int i=0;i<client.length;i++) client[i].send(msg);
} catch (Exception e) {
e.printStackTrace();
try { connect(); }
catch (Exception ignored) { }