Database Reference
In-Depth Information
int i = 0;
//emitting sample records
while (i < 1) {
try {
myRecord = "MY Sample record";
channel.basicPublish(EXCHANGE_NAME, routingKey,
MessageProperties.PERSISTENT_TEXT_PLAIN,
myRecord.getBytes());
System.out.println(" [x] Sent '" + myRecord + "'
sent at " + new Date());
i++;
Thread.sleep(2);
} catch (Exception e) {
e.printStackTrace();
}
}
channel.close();
connection.close();
}
}
Search WWH ::




Custom Search