You can use a method call expression (aka java bean) where you add the direct: prefix to the media headers.
Or try look at groovy or something which may be able to prefix to a list. I think I have seen that done in fabric8 v1. On Mon, Jan 19, 2015 at 6:32 PM, James Green <james.mk.gr...@gmail.com> wrote: > .recipientList(simple("direct:${body.media}")) > > So media is a List<String> property where each entry has a media value: > "sms", "email", etc. > > What I get out of this is an exception (where "sms" is the only media): > > org.apache.camel.component.direct.DirectConsumerNotAvailableException: No > consumers available on endpoint: Endpoint[direct://%5Bsms%5D]. > > If I remove the direct: from the simple expression and place it directly in > the media property value it works fine. But then my POJO "knows" about > direct: prefixes. Not what I had hoped. > > Any ideas? I can't use transform() as the rest of the message needs to be > passed onwards. > > James -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/