File tree Expand file tree Collapse file tree 4 files changed +43
-1
lines changed
src/main/scala/com/baeldung/elasticmq Expand file tree Collapse file tree 4 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -439,6 +439,11 @@ lazy val scala_libraries = (project in file("scala-libraries"))
439439 " nl.gn0s1s" %% " elastic4s-core" % elastic4sVersion,
440440 logback
441441 ),
442+ libraryDependencies ++= Seq (
443+ " org.elasticmq" %% " elasticmq-core" % " 1.6.5" ,
444+ " org.elasticmq" %% " elasticmq-server" % " 1.6.5" ,
445+ " org.elasticmq" %% " elasticmq-rest-sqs" % " 1.6.5"
446+ ),
442447 Defaults .itSettings
443448 )
444449
Original file line number Diff line number Diff line change 77- [ A Guide to the Scala Retry Library] ( https://www.baeldung.com/scala/retry-library )
88- [ Introduction to Apache Log4j in Scala] ( https://www.baeldung.com/scala/apache-log4j )
99- [ Logging in Scala Applications Using Scala-Logging] ( https://www.baeldung.com/scala/scala-logging )
10- - [ AWScala – AWS SDK for Scala] ( https://www.baeldung.com/scala/awscala-aws-sdk-for-scala )
10+ - [ AWScala – AWS SDK for Scala] ( https://www.baeldung.com/scala/awscala-aws-sdk-for-scala )
11+ - [ Introduction to ElasticMQ] https://baeldung.com/scala/introduction-to-elasticmq
Original file line number Diff line number Diff line change 1+ package com .baeldung .elasticmq
2+
3+ // val config = ConfigFactory.load("elasticmq.conf")
4+ // val server = new ElasticMQServer(new ElasticMQServerConfig(config))
5+ // server.start()
Original file line number Diff line number Diff line change 1+ package com .baeldung .elasticmq
2+
3+ import org .elasticmq .rest .sqs .SQSRestServerBuilder
4+ import org .elasticmq .server .ElasticMQServer
5+ import org .elasticmq .server .config .ElasticMQServerConfig
6+
7+ import com .typesafe .config .ConfigFactory
8+
9+ import org .apache .pekko .actor .{Actor , ActorRef , ActorSystem }
10+ import org .apache .pekko .event .LoggingAdapter
11+
12+ implicit val actorSystem : ActorSystem = ActorSystem .create()
13+ implicit val executionContext : concurrent.ExecutionContextExecutor = actorSystem.dispatcher
14+ implicit val m_logger : LoggingAdapter = actorSystem.log
15+
16+ // class QueueActor extends Actor:
17+ // val messageQueue: mutable.PriorityQueue[InternalMessage]()
18+ // val awaiting: mutable.PriorityQueue[ActorRef]()
19+
20+ // def receive = case ReceiveMessages =>
21+
22+
23+ // val result: Future[ActorRef] = flow:
24+ // (queueManager ? Lookup(name)).apply() match
25+ // case Some(queueActor) => queueActor
26+ // case None => (queueManager ? Create(name)).apply()
27+
28+ lazy val server = SQSRestServerBuilder
29+ .withPort(9325 )
30+ .withInterface(" localhost" )
31+ .start()
You can’t perform that action at this time.
0 commit comments