Hi,

I think you can change you application to be more dynamically.
You should have a control route which accept the request in the public room and 
if there is a new private chat, you need to create a new route for it.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Monday, March 18, 2013 at 9:00 AM, optimist wrote:

> I am trying to setup a camel(2.9.5) based bot to move messages from xmpp
> users to JMS and back. I successfully could get one message to either side.  
>  
> While sending first message out to xmpp user, a private chat session is
> created. Subsequent messages come to private session, and my route is not
> invoked when message is received. Looking at the code, this is how chat
> session is created,  
>  
> chat = chatManager.createChat(getParticipant(), endpoint.getChatId(), new
> MessageListener() {  
> public void processMessage(Chat chat, Message message) {  
> ......  
> // not here to do conversation
> ....  
> LOG.debug("Received and discarding message from {} :
> {}", getParticipant(), message.getBody());  
> }  
>  
> It simply discards the subsequent messages after the chat is created. What I
> want is to process all subsequent msgs like the first one was. It seems
> like a code change/route definition change is needed. My routes are like,(I
> populate header)  
>  
> String fromURL = "xmpp://[email protected] 
> (mailto:[email protected]):5022?password=bot";  
> from(xmppURL).process(new
> marshallProcessor(){}).recipientList(header("destURL"));  
>  
> from("jms:topic:clientx").process(new
> unmarshallProcessor(){}).recipientList(header("dest"));  
>  
> Should I change the fromURL format to stop messages going to chat session? I
> tried deleting the chat session anticipating, the message will be put on
> route if there is no chat session. But I was wrong. Any help really
> appreciated.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/routing-private-chat-xmpp-messages-to-camel-route-tp5729325.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).



Reply via email to