From ae4132adba0714e8cad2ea4ceeab7eeb4bf700fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stef=C3=A1n=20Freyr=20Stef=C3=A1nsson?= Date: Thu, 18 Jul 2013 19:42:07 +0000 Subject: [PATCH] Adding a test producer application. --- .../rabbitmq/RabbitMQProducerMain.java | 182 ++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 examples/src/main/java/druid/examples/rabbitmq/RabbitMQProducerMain.java diff --git a/examples/src/main/java/druid/examples/rabbitmq/RabbitMQProducerMain.java b/examples/src/main/java/druid/examples/rabbitmq/RabbitMQProducerMain.java new file mode 100644 index 00000000000..a070bfff929 --- /dev/null +++ b/examples/src/main/java/druid/examples/rabbitmq/RabbitMQProducerMain.java @@ -0,0 +1,182 @@ +package druid.examples.rabbitmq; + +import com.rabbitmq.client.Channel; +import com.rabbitmq.client.Connection; +import com.rabbitmq.client.ConnectionFactory; +import org.apache.commons.cli.*; + +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * + */ +public class RabbitMQProducerMain +{ + public static void main(String[] args) + throws Exception + { + // We use a List to keep track of option insertion order. See below. + final List