From 2be0ff3fecbb0025cd4767ca99e83706a8d5b56b Mon Sep 17 00:00:00 2001 From: raymond Date: Mon, 7 Nov 2016 19:44:12 -0800 Subject: [PATCH] added some producer and consumer code going to run activemq --- ScalaChatApp/.cache-main | 118 ++++++++++++++++++ ScalaChatApp/.classpath | 8 ++ ScalaChatApp/.gitignore | 1 + ScalaChatApp/.project | 18 +++ .../.settings/org.eclipse.jdt.core.prefs | 11 ++ ScalaChatApp/src/Consumer.scala | 49 ++++++++ ScalaChatApp/src/Producer.scala | 28 +++++ 7 files changed, 233 insertions(+) create mode 100644 ScalaChatApp/.cache-main create mode 100644 ScalaChatApp/.classpath create mode 100644 ScalaChatApp/.gitignore create mode 100644 ScalaChatApp/.project create mode 100644 ScalaChatApp/.settings/org.eclipse.jdt.core.prefs create mode 100644 ScalaChatApp/src/Consumer.scala create mode 100644 ScalaChatApp/src/Producer.scala diff --git a/ScalaChatApp/.cache-main b/ScalaChatApp/.cache-main new file mode 100644 index 0000000..585fe44 --- /dev/null +++ b/ScalaChatApp/.cache-main @@ -0,0 +1,118 @@ +format version: 5 +output mode: +1 items +0 -> multiple +output directories: +1 items +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src -> /home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/bin +compile options: +8 items +0 -> -javabootclasspath +1 -> /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/icedtea-sound.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/java-atk-wrapper.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/zipfs.jar +2 -> -javaextdirs +3 -> +4 -> -bootclasspath +5 -> /home/raymond/Desktop/eclipse/plugins/org.scala-lang.scala-library_2.11.8.v20160304-115712-1706a37eb8.jar +6 -> -encoding +7 -> UTF-8 +javac options: +0 items +compiler version: +1 items +0 -> 2.11.8 +compile order: +1 items +0 -> Mixed +name hashing: +1 items +0 -> false +products: +5 items +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Consumer.scala -> /home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/bin/Consumer$$anon$1.class +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Consumer.scala -> /home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/bin/Consumer$.class +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Consumer.scala -> /home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/bin/Consumer.class +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Producer.scala -> /home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/bin/Producer$.class +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Producer.scala -> /home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/bin/Producer.class +binary dependencies: +6 items +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Consumer.scala -> /home/raymond/Desktop/eclipse/plugins/org.scala-lang.scala-library_2.11.8.v20160304-115712-1706a37eb8.jar +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Consumer.scala -> /opt/apache-activemq-5.14.1/activemq-all-5.14.1.jar +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Consumer.scala -> /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Producer.scala -> /home/raymond/Desktop/eclipse/plugins/org.scala-lang.scala-library_2.11.8.v20160304-115712-1706a37eb8.jar +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Producer.scala -> /opt/apache-activemq-5.14.1/activemq-all-5.14.1.jar +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Producer.scala -> /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar +direct source dependencies: +0 items +direct external dependencies: +0 items +public inherited source dependencies: +0 items +public inherited external dependencies: +0 items +member reference internal dependencies: +0 items +member reference external dependencies: +0 items +inheritance internal dependencies: +0 items +inheritance external dependencies: +0 items +class names: +5 items +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Consumer.scala -> Consumer +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Consumer.scala -> Consumer$ +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Consumer.scala -> Consumer$$anon$1 +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Producer.scala -> Producer +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Producer.scala -> Producer$ +used names: +0 items +product stamps: +5 items +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/bin/Consumer$$anon$1.class -> lastModified(1478575241000) +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/bin/Consumer$.class -> lastModified(1478575241000) +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/bin/Consumer.class -> lastModified(1478575241000) +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/bin/Producer$.class -> lastModified(1478575535000) +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/bin/Producer.class -> lastModified(1478575534000) +source stamps: +2 items +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Consumer.scala -> hash(6ce5af71f2859949435cbfa8528e68badf1655ee) +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Producer.scala -> hash(27255e3d00355250df9779b7cf99e0fd66651490) +binary stamps: +3 items +/home/raymond/Desktop/eclipse/plugins/org.scala-lang.scala-library_2.11.8.v20160304-115712-1706a37eb8.jar -> lastModified(1476753354000) +/opt/apache-activemq-5.14.1/activemq-all-5.14.1.jar -> lastModified(1474996340000) +/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar -> lastModified(1461399026000) +class names: +3 items +/home/raymond/Desktop/eclipse/plugins/org.scala-lang.scala-library_2.11.8.v20160304-115712-1706a37eb8.jar -> scala.Predef$ +/opt/apache-activemq-5.14.1/activemq-all-5.14.1.jar -> org.apache.activemq.ActiveMQConnectionFactory +/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar -> java.lang.Object +internal apis: +2 items +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Consumer.scala -> +rO0ABXNyABB4c2J0aS5hcGkuU291cmN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091dHB1dFNldHRpbmc7eHAAAAFYQfgi4HVyABpbTHhzYnRpLmFwaS5PdXRwdXRTZXR0aW5nO39qwvOnh6VCAgAAeHAAAAABc3IAF3hzYnRpLmFwaS5PdXRwdXRTZXR0aW5netmaR3T7HXsCAAJMAA9vdXRwdXREaXJlY3RvcnlxAH4AHEwAD3NvdXJjZURpcmVjdG9yeXEAfgAceHB0AEYvaG9tZS9yYXltb25kL0Ryb3Bib3gvRmFsbDE2L0NTNDA4L0NTNDA4X1NjYWxhQ2hhdEFwcC9TY2FsYUNoYXRBcHAvYmludABGL2hvbWUvcmF5bW9uZC9Ecm9wYm94L0ZhbGwxNi9DUzQwOC9DUzQwOF9TY2FsYUNoYXRBcHAvU2NhbGFDaGF0QXBwL3NyY3VyAAJbQqzzF/gGCFTgAgAAeHAAAAAUJyVePQA1UlDfl3m3z5ng/WZlFJA= +external apis: +0 items +source infos: +2 items +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Consumer.scala -> +AAAAAAAAAAA= +/home/raymond/Dropbox/Fall16/CS408/CS408_ScalaChatApp/ScalaChatApp/src/Producer.scala -> +AAAAAAAAAAA= +compilations: +13 items +00 -> rO0ABXNyABV4c2J0aS5hcGkuQ29tcGlsYXRpb27t+uDDauigQgIAAkoACXN0YXJ0VGltZVsAB291dHB1dHN0ABpbTHhzYnRpL2FwaS9PdXRwdXRTZXR0aW5nO3hwAAABWEHgSx91cgAaW0x4c2J0aS5hcGkuT3V0cHV0U2V0dGluZzt/asLzp4elQgIAAHhwAAAAAXNyABd4c2J0aS5hcGkuT3V0cHV0U2V0dGluZ3rZmkd0+x17AgACTAAPb3V0cHV0RGlyZWN0b3J5dAASTGphdmEvbGFuZy9TdHJpbmc7TAAPc291cmNlRGlyZWN0b3J5cQB+AAZ4cHQARi9ob21lL3JheW1vbmQvRHJvcGJveC9GYWxsMTYvQ1M0MDgvQ1M0MDhfU2NhbGFDaGF0QXBwL1NjYWxhQ2hhdEFwc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fU2NhbGFDaGF0QXBwL1NjYWxhQ2hhdEFwcC9iaW50AEYvaG9tZS9yYXltb25kL0Ryb3Bib3gvRmFsbDE2L0NTNDA4L0NTNDA4X1NjYWxhQ2hhdEFwcC9TY2FsYUNoYXRBcHAvc3Jj diff --git a/ScalaChatApp/.classpath b/ScalaChatApp/.classpath new file mode 100644 index 0000000..630db01 --- /dev/null +++ b/ScalaChatApp/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/ScalaChatApp/.gitignore b/ScalaChatApp/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/ScalaChatApp/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/ScalaChatApp/.project b/ScalaChatApp/.project new file mode 100644 index 0000000..a3f463e --- /dev/null +++ b/ScalaChatApp/.project @@ -0,0 +1,18 @@ + + + ScalaChatApp + + + + + + org.scala-ide.sdt.core.scalabuilder + + + + + + org.scala-ide.sdt.core.scalanature + org.eclipse.jdt.core.javanature + + diff --git a/ScalaChatApp/.settings/org.eclipse.jdt.core.prefs b/ScalaChatApp/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/ScalaChatApp/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/ScalaChatApp/src/Consumer.scala b/ScalaChatApp/src/Consumer.scala new file mode 100644 index 0000000..7fa52c6 --- /dev/null +++ b/ScalaChatApp/src/Consumer.scala @@ -0,0 +1,49 @@ +import javax.jms._ +import org.apache.activemq.ActiveMQConnection +import org.apache.activemq.ActiveMQConnectionFactory + + +object Consumer { + val url = "tcp://localhost:61616" + val topic = "chatroom" + + def main(args: Array[String]) + { + val connectionFactory = new ActiveMQConnectionFactory(url) + val connection = connectionFactory.createConnection + //connection.setClientID("ConsumerSynchronous") + connection.start() + + println("Started") + + val session: Session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE) + //val queue = session.createQueue("SendSynchronousMsgQueue") + val destination: Topic = session.createTopic(this.topic) + val consumer: MessageConsumer = session.createConsumer(destination) + + val listener = new MessageListener { + def onMessage(message: Message) { + message match { + case text: TextMessage => { + //val replyProducer = session.cr + //replyProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT) + + println("Received message: " + text.getText) + + //val replyMessage = session.createTextMessage("Yes I received your message!") + //replyMessage.setJMSCorrelationID(text.getJMSCorrelationID()) + + //println("Reply sent!") + + //replyProducer.send(replyMessage) + } + case _ => { + throw new Exception("Unhandled Message Type: " + message.getClass.getSimpleName) + } + } + } + } + consumer.setMessageListener(listener) + } + +} \ No newline at end of file diff --git a/ScalaChatApp/src/Producer.scala b/ScalaChatApp/src/Producer.scala new file mode 100644 index 0000000..1c9155d --- /dev/null +++ b/ScalaChatApp/src/Producer.scala @@ -0,0 +1,28 @@ +import org.apache.activemq.ActiveMQConnection; +import org.apache.activemq.ActiveMQConnectionFactory +import javax.jms._ +import java.util.Scanner +object Producer { + val url: String = "tcp://localhost:61616" + val topicName: String = "chatroom" + + def main(args:Array[String]) + { + val input: Scanner = new Scanner(System.in) + val connectionFactory: ConnectionFactory = new ActiveMQConnectionFactory(url) + val connection: Connection = connectionFactory.createConnection + connection.start + val session: Session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE) + val destination: Topic = session.createTopic(topicName) + val messageProducer: MessageProducer = session.createProducer(destination) + val textMessage: TextMessage = session.createTextMessage("Hello Subscriber!") + while(true) { + val userMessage = input.nextLine() + textMessage.setText(userMessage) + messageProducer.send(textMessage) + println("Message sent to subscriber: '" + textMessage.getText + "'") + } + connection.close + + } +} \ No newline at end of file