[ https://issues.apache.org/activemq/browse/CAMEL-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang resolved CAMEL-1884. --------------------------------- Resolution: Fixed Fix Version/s: 2.0.0 Applied patch with thanks to Stan. http://svn.apache.org/viewvc?rev=801874&view=rev > XMPP producer and consumer don't share the same connection and Chat objects > --------------------------------------------------------------------------- > > Key: CAMEL-1884 > URL: https://issues.apache.org/activemq/browse/CAMEL-1884 > Project: Apache Camel > Issue Type: Improvement > Affects Versions: 2.0-M3 > Reporter: Stan Lewis > Assignee: Willem Jiang > Priority: Minor > Fix For: 2.0.0 > > Attachments: patch.txt, patch.txt > > > It's actually not possible to produce and consume messages from the same XMPP > endpoint, i.e. something like: > from("xmpp://irc.jabber.org...").to("direct:out"); > from("direct:in").to("xmpp://irc.jabber.org..."); > typically what I see happen is that the consumer will work until the XMPP > producer sends a message, at that point the consumer stops receiving > messages. What's happening is that producers and consumers created from the > endpoint also create their own connection object and then also create their > own Chat object. The attached patch ties the XMPP connection to the > endpoint, making a producer or consumer share this connection. If a consumer > creates the Chat first the producer will look it up and connect to the > existing Chat. If the producer creates the Chat then the consumer will > attach itself as a listener to this Chat. > I notice that the tests are turned off as they require a local Jabber server > instance to run. Is it worth creating some accounts on jabber.org to run the > test with? Currently I've been testing this patch using my own Google talk > accounts, this is all working towards an IRC to Jabber bridge that I might > submit later on as a more complicated demo... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.