Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

https://github.com/sstone/amqp-client/issues/66 #67

Open
wants to merge 1 commit into
base: scala2.11
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/scala/com/github/sstone/amqp/Amqp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import akka.actor.{Actor, Props, ActorRef, ActorRefFactory}
import akka.actor.FSM.{SubscribeTransitionCallBack, CurrentState, Transition}
import java.util.concurrent.CountDownLatch


object Amqp {

/**
Expand Down Expand Up @@ -104,6 +105,8 @@ object Amqp {

case class DeleteExchange(name: String, ifUnused: Boolean = false) extends Request

case class ExchangeBind(destination: String, source: String, routing_key: String, args: Map[String, AnyRef] = Map.empty) extends Request

case class QueueBind(queue: String, exchange: String, routing_key: String, args: Map[String, AnyRef] = Map.empty) extends Request

case class QueueUnbind(queue: String, exchange: String, routing_key: String, args: Map[String, AnyRef] = Map.empty) extends Request
Expand Down
4 changes: 4 additions & 0 deletions src/main/scala/com/github/sstone/amqp/ChannelOwner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ object ChannelOwner {
log.debug("binding queue {} to key {} on exchange {}", queue, routingKey, exchange)
sender ! withChannel(channel, request)(c => c.queueBind(queue, exchange, routingKey, args))
}
case request@ExchangeBind(destination, source, routingKey, args) => {
log.debug("binding exchange {} to key {} on exchange {}", destination, routingKey, source)
sender ! withChannel(channel, request)(c => c.exchangeBind(destination, source, routingKey, args))
}
case request@QueueUnbind(queue, exchange, routingKey, args) => {
log.debug("unbinding queue {} to key {} on exchange {}", queue, routingKey, exchange)
sender ! withChannel(channel, request)(c => c.queueUnbind(queue, exchange, routingKey, args))
Expand Down