Merge pull request #1574 from akka/wip-camel-touchup-patriknw

Keep the order of buffered messages in Camel producer, see #3477
This commit is contained in:
Roland Kuhn 2013-07-04 04:58:43 -07:00
commit a56b8b248d
15 changed files with 101 additions and 99 deletions

View file

@ -5,22 +5,6 @@
Camel
#############
Additional Resources
====================
For an introduction to akka-camel 2, see also the Peter Gabryanczyk's talk `Migrating akka-camel module to Akka 2.x`_.
For an introduction to akka-camel 1, see also the `Appendix E - Akka and Camel`_
(pdf) of the book `Camel in Action`_.
.. _Appendix E - Akka and Camel: http://www.manning.com/ibsen/appEsample.pdf
.. _Camel in Action: http://www.manning.com/ibsen/
.. _Migrating akka-camel module to Akka 2.x: http://skillsmatter.com/podcast/scala/akka-2-x
Other, more advanced external articles (for version 1) are:
* `Akka Consumer Actors: New Features and Best Practices <http://krasserm.blogspot.com/2011/02/akka-consumer-actors-new-features-and.html>`_
* `Akka Producer Actors: New Features and Best Practices <http://krasserm.blogspot.com/2011/02/akka-producer-actor-new-features-and.html>`_
Introduction
============
@ -308,8 +292,8 @@ In-out message exchanges between endpoints and actors are
designed to be asynchronous. This is the case for both, consumer and producer
actors.
* A consumer endpoint sends request messages to its consumer actor using the ``!``
(tell) operator and the actor returns responses with ``sender !`` once they are
* A consumer endpoint sends request messages to its consumer actor using the ``tell``
method and the actor returns responses with ``getSender().tell`` once they are
ready.
* A producer actor sends request messages to its endpoint using Camel's
@ -411,7 +395,7 @@ The following URI options are supported:
| | | | See also :ref:`camel-acknowledgements-java`. |
+--------------+----------+---------+------------------------------------------------+
Here's an actor endpoint URI example containing an actor uuid::
Here's an actor endpoint URI example containing an actor path::
akka://some-system/user/myconsumer?autoAck=false&replyTimeout=100+millis
@ -582,3 +566,19 @@ seconds:
For more information about the Camel Quartz component, see here:
http://camel.apache.org/quartz.html
Additional Resources
====================
For an introduction to akka-camel 2, see also the Peter Gabryanczyk's talk `Migrating akka-camel module to Akka 2.x`_.
For an introduction to akka-camel 1, see also the `Appendix E - Akka and Camel`_
(pdf) of the book `Camel in Action`_.
.. _Appendix E - Akka and Camel: http://www.manning.com/ibsen/appEsample.pdf
.. _Camel in Action: http://www.manning.com/ibsen/
.. _Migrating akka-camel module to Akka 2.x: http://skillsmatter.com/podcast/scala/akka-2-x
Other, more advanced external articles (for version 1) are:
* `Akka Consumer Actors: New Features and Best Practices <http://krasserm.blogspot.com/2011/02/akka-consumer-actors-new-features-and.html>`_
* `Akka Producer Actors: New Features and Best Practices <http://krasserm.blogspot.com/2011/02/akka-producer-actor-new-features-and.html>`_

View file

@ -19,8 +19,9 @@ public class Consumer3 extends UntypedConsumerActor{
public void onReceive(Object message) {
if (message instanceof CamelMessage) {
CamelMessage camelMessage = (CamelMessage) message;
transformer.forward(camelMessage.getBodyAs(String.class, getCamelContext()),
getContext());
// Forward a string representation of the message body to transformer
String body = camelMessage.getBodyAs(String.class, getCamelContext());
transformer.forward(camelMessage.withBody(body), getContext());
} else
unhandled(message);
}