--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
info] Test Starting: initializationError
[error] Test Failed: initializationError
java.lang.Exception: No runnable methods
at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:154)
at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:112)
at org.junit.runners.ParentRunner.validate(ParentRunner.java:253)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:55)
at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:56)
at org.junit.internal.builders.JUnit4Builder.runnerForClass(JUnit4Builder.java:13)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:93)
at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:84)
at org.junit.runners.Suite.<init>(Suite.java:66)
at org.junit.runner.Request.classes(Request.java:68)
at org.junit.runner.JUnitCore.run(JUnitCore.java:107)
at org.scalatest.junit.JUnitSuite$class.run(JUnitSuite.scala:261)
at se.scalablesolutions.akka.amqp.test.AMQPProducerMessageTest.run(AMQPProducerMessageTest.scala:16)
at org.scalatest.tools.ScalaTestFramework$ScalaTestRunner.run(ScalaTestFramework.scala:40)
at sbt.TestRunner.run(TestFramework.scala:52)
at sbt.TestRunner.runTest$1(TestFramework.scala:66)
at sbt.TestRunner.run(TestFramework.scala:75)
at sbt.TestFramework$$anonfun$9$$anonfun$apply$11.runTest$2(TestFramework.scala:192)
at sbt.TestFramework$$anonfun$9$$anonfun$apply$11$$anonfun$apply$12.apply(TestFramework.scala:203)
at sbt.TestFramework$$anonfun$9$$anonfun$apply$11$$anonfun$apply$12.apply(TestFramework.scala:203)
at sbt.NamedTestTask.run(TestFramework.scala:91)
at sbt.ScalaProject$$anonfun$sbt$ScalaProject$$toTask$1.apply(ScalaProject.scala:187)
at sbt.ScalaProject$$anonfun$sbt$ScalaProject$$toTask$1.apply(ScalaProject.scala:187)
at sbt.TaskManager$Task.invoke(TaskManager.scala:62)
at sbt.impl.RunTask.doRun$1(RunTask.scala:77)
at sbt.impl.RunTask.runTask(RunTask.scala:85)
at sbt.impl.RunTask.sbt$impl$RunTask$$runIfNotRoot(RunTask.scala:60)
at sbt.impl.RunTask$$anonfun$runTasksExceptRoot$2.apply(RunTask.scala:48)
at sbt.impl.RunTask$$anonfun$runTasksExceptRoot$2.apply(RunTask.scala:48)
at sbt.Distributor$Run$Worker$$anonfun$2.apply(ParallelRunner.scala:131)
at sbt.Distributor$Run$Worker$$anonfun$2.apply(ParallelRunner.scala:131)
at sbt.Control$.trapUnit(Control.scala:19)
at sbt.Distributor$Run$Worker.run(ParallelRunner.scala:131)
> --
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To post to this group, send email to akka...@googlegroups.com.
> To unsubscribe from this group, send email to
> akka-user+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/akka-user?hl=en.
>
--
Jonas Bonér
work: http://jayway.com
code: http://akkasource.com
blog: http://jonasboner.com
twitter: @jboner
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
On Tue, Jul 13, 2010 at 5:23 PM, Sebastian Latza <ma...@sebastian-latza.de> wrote:Hi Irmo,Hi Sebastian,some details I came across while briefly trying out the code:
- it would be nice if I could specify the name of my queues. Right now
they seem to be autogenerated, but in my usage scenario I need access
to the naming scheme since other consumers are accessing the queues
too.You can optionally specify your own queue name with the ConsumerParameters, see:case class ConsumerParameters(exchangeParameters: ExchangeParameters,routingKey: String,deliveryHandler: ActorRef,queueName: Option[String] = None,queueDurable: Boolean = false,queueAutoDelete: Boolean = true,queuePassive: Boolean = false,queueExclusive: Boolean = false,selfAcknowledging: Boolean = true,channelParameters: Option[ChannelParameters] = None)So something like:val consParams = new ConsumerParameters(exParams, "my.key", handlerActor, Some("my.queue"))- As I mentioned a while ago on the list, you might run into
starvation if the consuming fails to acknowlege the recieved in the
non-selfAcknowledging mode when hitting basicQos. A Scheduler with
some kind of message timeout tracking would help here I guess. (maybe
just a fault on my side, missing this mechanic in the code)If something goes wrong in the handling actor that prevents acknowledgement, you should throw an exception or kill your actor.Because the handling actor is automatically supervised by the consumer actor, all are restarted, killing the current channel too.By killing the channel, the broker puts the unacknowledged messages back in the 'messages ready' state so another consumer can pick it up."Let it fail" ;-)I might make a nice example and/or unit test that can prove this- In the documentation:
val exchangeParameters = ExchangeParameters("my_topic_exchange",
ExchangeType.Topic)
val myConsumer = AMQP.newConsumer(connection, ConsumerParameters(..
I think exchangeParameters should be ConsumerParameters there.
Ah, no I already see what's wrong. Currently in the example the ConsumerParameters take channelParameters as a param, but that was changed to the new ExchangeParameters. ChannelParameters can still be set, but only if needed.Thanks for spotting and fixed :)Anyway, great work, especially the explicit ack'ing solves some major
problems for me.
You're welcome. :-)I use it heavily too, so I will continuesly improve and optimize it, but the main API should be fine like it is now.I will make some more improvements on the convenience rpc actors and their serialization posibilities, but I have to use/implement it a couple of times first to find the pain-points.Regards
Sebastian
Cheers,Irmo2010/7/8 Irmo Manie <irmo....@gmail.com>
I've been having trouble killing 'temporary' (ie. ones I need to get
rid of cleanly later) consumers in 0.9.1 recently.
Sending a ! Stop to a consumer kills the entire process! After a lot
of trial and error, I have resorted to sending a new
MessageConsumerListener with a bad queue name and route key to get rid
of them in order to (maybe) replace them later. They won't go away (an
AMQP thread with a connection persists whatever I do), however.
This new AMQP stuff changes a lot, and I haven't tried this with the
master branch yet .. so I'm just saying.. and stuck with the current
badly leaking setup. :)
I'll look into it better after Monday, can't touch it before then.
Just thought I'd mention it (remember this concerns 0.9.1)
Santi
--
Thought I'd just update this to say that the below problem has gone
away with the new AMQP API, because the stop()s work properly and the
connection is handled by the user, so I can stop() that too when I
need to. No more leaking threads or connections. Excellent work! :)
Cheers,
Santi
Hi,
Thought I'd just update this to say that the below problem has gone
away with the new AMQP API, because the stop()s work properly and the
connection is handled by the user, so I can stop() that too when I
need to. No more leaking threads or connections.
Excellent work! :)
Cheers,
Santi