Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed a problem with the AMQP stuff that caused the Lift actor send()…

… method to be confused with the AMQP send() and sendMsg() methods
  • Loading branch information...
commit c800244bb083c39a5c2b877de46d99abb9c6468d 1 parent 2cbada2
David Pollak dpp authored

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. +5 5 amqp/src/main/scala/net/liftweb/amqp/AMQPSender.scala
10 amqp/src/main/scala/net/liftweb/amqp/AMQPSender.scala
@@ -47,7 +47,7 @@ abstract class AMQPSender[T](cf: ConnectionFactory, host: String, port: Int, exc
47 47 }
48 48
49 49 protected def messageHandler = {
50   - case AMQPMessage(msg: T) => send(msg)
  50 + case AMQPMessage(msg: T) => sendMsg(msg)
51 51 }
52 52 }
53 53
@@ -93,17 +93,17 @@ class ExampleStringAMQPSender {
93 93 * efficient with resources.
94 94 */
95 95 object ExampleDirectAMQPSender {
96   - def send[T](msg: T) {
  96 + def sendMsg[T](msg: T) {
97 97 val params = new ConnectionParameters
98 98 // All of the params, exchanges, and queues are all just example data.
99 99 params.setUsername("guest")
100 100 params.setPassword("guest")
101 101 params.setVirtualHost("/")
102 102 params.setRequestedHeartbeat(0)
103   - send(msg, params, "localhost", 5672)
  103 + sendMsg(msg, params, "localhost", 5672)
104 104 }
105 105
106   - def send[T](msg: T, params: ConnectionParameters, host: String, port: Int) {
  106 + def sendMsg[T](msg: T, params: ConnectionParameters, host: String, port: Int) {
107 107 val factory = new ConnectionFactory(params)
108 108 val conn = factory.newConnection(host, port)
109 109 val channel = conn.createChannel()
@@ -130,7 +130,7 @@ object AMQPExampleFunPack {
130 130 def actorExample {
131 131 val recv = new ExampleStringAMQPListener()
132 132 // You probably know what message you are going to see. 'hello!'
133   - val sender = ExampleDirectAMQPSender.send("hello!")
  133 + val sender = ExampleDirectAMQPSender.sendMsg("hello!")
134 134 sender
135 135 }
136 136 }

0 comments on commit c800244

Please sign in to comment.
Something went wrong with that request. Please try again.