You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by furchess123 <co...@hotmail.com> on 2017/05/03 16:19:06 UTC

Disabling coma delimiter in @RecipientList-annotated methods that return String

The  Recipient List
<http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html>  
documentation states:

/Notice that the Recipient List can send to multiple Endpoints if the
expression returns either a java.util.List, array, java.util.Iteratable or a
String. If the returned value is a String then you can specify multiple
endpoints separated by comma. So if you only want to send to one endpoint
and use a String type, then beware of the comma. If you need to use a comma,
then you can change or turn off the separator on the Recipient List.
For example, to turn it, when using Camel 2.13 onwards:
.recipientList(simple("sql:select firstName, lastName from myTable where
user = ${header.user}"), "false")

And for users of Camel 2.12.x or older, we use a non existing delimiter
char:
.recipientList(simple("sql:select firstName, lastName from myTable where
user = ${header.user}"), "@")/

Is it possible to do the same for a @RecipienList-annotated method that
returns a String, e.g a *single* Camel endpoint URI that contains comas in
it?

Thanks!



--
View this message in context: http://camel.465427.n5.nabble.com/Disabling-coma-delimiter-in-RecipientList-annotated-methods-that-return-String-tp5798618.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Disabling coma delimiter in @RecipientList-annotated methods that return String

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Okay I took at look in the source, and you can use the value "false"
to turn it off. I have updated the javadoc to include that
information.

On Thu, May 4, 2017 at 7:05 AM, Claus Ibsen <cl...@gmail.com> wrote:
> You can look at the @RecipientList and see which attributes it has you
> can configure.
>
> On Wed, May 3, 2017 at 12:19 PM, furchess123 <co...@hotmail.com> wrote:
>> The  Recipient List
>> <http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html>
>> documentation states:
>>
>> /Notice that the Recipient List can send to multiple Endpoints if the
>> expression returns either a java.util.List, array, java.util.Iteratable or a
>> String. If the returned value is a String then you can specify multiple
>> endpoints separated by comma. So if you only want to send to one endpoint
>> and use a String type, then beware of the comma. If you need to use a comma,
>> then you can change or turn off the separator on the Recipient List.
>> For example, to turn it, when using Camel 2.13 onwards:
>> .recipientList(simple("sql:select firstName, lastName from myTable where
>> user = ${header.user}"), "false")
>>
>> And for users of Camel 2.12.x or older, we use a non existing delimiter
>> char:
>> .recipientList(simple("sql:select firstName, lastName from myTable where
>> user = ${header.user}"), "@")/
>>
>> Is it possible to do the same for a @RecipienList-annotated method that
>> returns a String, e.g a *single* Camel endpoint URI that contains comas in
>> it?
>>
>> Thanks!
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Disabling-coma-delimiter-in-RecipientList-annotated-methods-that-return-String-tp5798618.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: Disabling coma delimiter in @RecipientList-annotated methods that return String

Posted by Claus Ibsen <cl...@gmail.com>.
You can look at the @RecipientList and see which attributes it has you
can configure.

On Wed, May 3, 2017 at 12:19 PM, furchess123 <co...@hotmail.com> wrote:
> The  Recipient List
> <http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html>
> documentation states:
>
> /Notice that the Recipient List can send to multiple Endpoints if the
> expression returns either a java.util.List, array, java.util.Iteratable or a
> String. If the returned value is a String then you can specify multiple
> endpoints separated by comma. So if you only want to send to one endpoint
> and use a String type, then beware of the comma. If you need to use a comma,
> then you can change or turn off the separator on the Recipient List.
> For example, to turn it, when using Camel 2.13 onwards:
> .recipientList(simple("sql:select firstName, lastName from myTable where
> user = ${header.user}"), "false")
>
> And for users of Camel 2.12.x or older, we use a non existing delimiter
> char:
> .recipientList(simple("sql:select firstName, lastName from myTable where
> user = ${header.user}"), "@")/
>
> Is it possible to do the same for a @RecipienList-annotated method that
> returns a String, e.g a *single* Camel endpoint URI that contains comas in
> it?
>
> Thanks!
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Disabling-coma-delimiter-in-RecipientList-annotated-methods-that-return-String-tp5798618.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2