This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.sstone.amqp | |
import akka.actor.ActorDSL._ | |
import akka.actor.{Props, Actor, ActorSystem} | |
import com.github.sstone.amqp.Amqp._ | |
import com.github.sstone.amqp.ChannelOwner.Connected | |
import com.rabbitmq.client.ConnectionFactory | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.duration._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.sstone.amqp | |
import akka.actor.{Props, Actor, ActorSystem} | |
import com.rabbitmq.client.ConnectionFactory | |
import com.github.sstone.amqp.Amqp.{Publish, AddStatusListener} | |
import com.github.sstone.amqp.ChannelOwner.{Disconnected, Connected} | |
import scala.concurrent.duration._ | |
object StatusListeners extends App { | |
import scala.concurrent.ExecutionContext.Implicits.global |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.sstone.amqp | |
import akka.testkit.TestProbe | |
import com.github.sstone.amqp.Amqp._ | |
import com.rabbitmq.client.AMQP.BasicProperties | |
import org.junit.runner.RunWith | |
import org.scalatest.junit.JUnitRunner | |
import scala.collection.JavaConversions._ | |
import scala.concurrent.duration._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.sstone.amqp.bug55 | |
import akka.actor.{Actor, ActorLogging, ActorSystem, Props} | |
import com.github.sstone.amqp.Amqp._ | |
import com.github.sstone.amqp.{Amqp, ChannelOwner, ConnectionOwner} | |
import com.rabbitmq.client.{AMQP, ConnectionFactory} | |
import scala.concurrent.duration._ | |
object MyProducer extends App { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.sstone.amqp | |
import java.util.concurrent.TimeUnit | |
import akka.actor._ | |
import akka.routing.{ActorRefRoutee, RoundRobinRoutingLogic, Router} | |
import akka.util.Timeout | |
import com.github.sstone.amqp.Amqp._ | |
import com.rabbitmq.client.ConnectionFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import akka.actor.{ActorLogging, Props, Actor, ActorSystem} | |
import com.github.sstone.amqp.Amqp._ | |
import com.github.sstone.amqp.{ChannelOwner, Consumer, Amqp, ConnectionOwner} | |
import com.rabbitmq.client.ConnectionFactory | |
import scala.concurrent.duration._ | |
import scala.concurrent.ExecutionContext.Implicits.global | |
object Bug60 extends App { | |
implicit val system = ActorSystem("mySystem") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvn scala:console | |
scala> import fr.acinq.bitcoin._ | |
import fr.acinq.bitcoin._ | |
scala> val random = new scala.util.Random | |
random: scala.util.Random = scala.util.Random@54d1608f | |
scala> val key:BinaryData = new Array[Byte](32) | |
key: fr.acinq.bitcoin.BinaryData = 0000000000000000000000000000000000000000000000000000000000000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.sstone.amqp | |
import java.util.UUID | |
import akka.actor.{ActorLogging, Actor, ActorSystem, Props} | |
import com.github.sstone.amqp.Amqp._ | |
import com.github.sstone.amqp.RpcServer.{IProcessor, ProcessResult} | |
import com.rabbitmq.client.{AMQP, BasicProperties, ConnectionFactory} | |
import scala.concurrent.Future |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.aphelia | |
import akka.actor.{Actor, ActorRef} | |
import akka.pattern.ask | |
import akka.serialization.Serializer | |
import amqp.Amqp.{Publish, Delivery} | |
import amqp.{RpcClient, RpcServer} | |
import amqp.RpcServer.ProcessResult | |
import com.rabbitmq.client.AMQP.BasicProperties | |
import akka.dispatch.{Future, Await} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class AddRequest(x:Int, y:Int) | |
case class AddResponse(sum:Int) | |
class Calculator extends Actor { | |
protected def receive = { | |
case AddRequest(a, b) => sender ! AddResponse(a + b) | |
} | |
} |
OlderNewer