I dont assume the camel-twitter can send DM to 2+ recipients in one go.
Though you can look at the twitter4j api whether that would be possible.

In Camel you can use a recipient list or multicast to send the same
message to N+ endpoints.
http://camel.apache.org/eip

Or use a dynamic router to "loop" until you should not send anymore messages.

Or use a java bean and implement logic in a for / while loop and use a
producer template / pojo producer to send the message etc.


On Wed, Oct 23, 2013 at 8:43 AM, P Manchanda <[email protected]> wrote:
> Hi,
>
> I am using the Apache Camel's Twitter Component to integrate my web app with 
> Twitter. My requirements is to send the direct messages to different twitter 
> users who follow my company's twitter account. Going through the 
> documentation, I am able to figure out how to send a direct message to a 
> single user. But I am not able to find a way to send same direct message to 
> multiple users.
>
> The incoming message would be available to me on a JMS queue. However, for 
> testing purpose I am reading it from a text file.
>
> My route looks like this for a single user:
>
>     from("file://c:/test")
>         .to("log:TWITTER?showAll=true&multiline=true&level=ERROR")
>          
> .to("twitter://directmessage?consumerKey=<<secret>>&consumerSecret=<<secret>>&accessToken=<<secret>>&accessTokenSecret=<<secret>>&user=<<myUser>>");
>
> There is another URI option 'userIds' but it seems to work only with the 
> streaming/filter Consumer endpoint.
>
> Thanks for the help.
>
> ___________________
> Thks & brgds
> P Manchanda
> Mobile: +91-9811210374



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to