[HeadsUp] implementing Dynamic Recipient Lists using annotations

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[HeadsUp] implementing Dynamic Recipient Lists using annotations

jstrachan
I've just added support for @RecipientList annotation on a bean method
to implement a dynamic recipient list.

This can be used when using @MesageDriven or @Consume to call the
method when messages arrive, or if the bean method is explicitly
invoked from a route.

e.g.

public class RouterBean {

    @MessageDriven(uri = "activemq:foo")
    @RecipientList
    public String[] route(String body) {
        return new String[]{"activemq:bar", "activemq:whatnot"};
    }
}

you can return a single Endpoint or object that can be converted into
a String; or a collection or array of such objects.

More documentation is here...
http://cwiki.apache.org/CAMEL/recipientlist-annotation.html

As usual feedback welcome!

--
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com
Reply | Threaded
Open this post in threaded view
|

Re: [HeadsUp] implementing Dynamic Recipient Lists using annotations

Nivi shri
Hi All

It would be helpful if some1 can point out to a link which demonstrates how to implement the dynamic recipient list.

Regards
Nivi

James.Strachan wrote
I've just added support for @RecipientList annotation on a bean method
to implement a dynamic recipient list.

This can be used when using @MesageDriven or @Consume to call the
method when messages arrive, or if the bean method is explicitly
invoked from a route.

e.g.

public class RouterBean {

    @MessageDriven(uri = "activemq:foo")
    @RecipientList
    public String[] route(String body) {
        return new String[]{"activemq:bar", "activemq:whatnot"};
    }
}

you can return a single Endpoint or object that can be converted into
a String; or a collection or array of such objects.

More documentation is here...
http://cwiki.apache.org/CAMEL/recipientlist-annotation.html

As usual feedback welcome!

--
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com