use of com.pspace.ifs.ksan.mq.MQSender in project ksan by infinistor.
the class TestDiskInfoSender method main.
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String host = "192.168.11.76";
String exchange = "diskExchange";
String option = "fanout";
String message;
try {
MQSender mq1ton = new MQSender(host, exchange, option, "");
while (true) {
message = getDiskInfo("/DATA");
mq1ton.send(message);
System.out.println(message);
Thread.sleep(10000);
}
} catch (Exception ex) {
System.out.println(ex);
}
}
use of com.pspace.ifs.ksan.mq.MQSender in project ksan by infinistor.
the class TestRecovery method main.
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String host = "192.168.11.76";
String exchange = "UtilityExchange";
String option = "fanout";
String bindingKey = "*.utility.recovery.*";
String message;
try {
MQSender mq1ton = new MQSender(host, exchange, option, bindingKey);
while (true) {
message = getDataToSend();
mq1ton.send(message);
System.out.println(message);
Thread.sleep(10000);
}
} catch (Exception ex) {
System.out.println(ex);
}
}
use of com.pspace.ifs.ksan.mq.MQSender in project ksan by infinistor.
the class TestSendDiskStartStop method main.
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String host = "192.168.11.76";
String queueName = "diskControl";
String action = "START";
String message;
try {
MQSender mq1to1 = new MQSender(host, queueName, false);
while (true) {
message = getDiskInfo("/DATA", action);
mq1to1.send(message);
System.out.println(message);
Thread.sleep(10000);
if (action.contains("START"))
action = "STOP";
else
action = "START";
}
} catch (Exception ex) {
System.out.println(ex);
}
}
Aggregations