On Mon, Jun 15, 2009 at 2:30 PM, Sameer Nambiar<[email protected]> wrote: > > Hi, > > I am looking to use Camel's XMPP endpoint for application to application > communication. The following environment has been configured: > > * Openfire 3.6.4 > * Camel 2.0-M1 > * Smack 3.1.0 > > I am a newbie to Camel. While I have been able to use the XMPP endpoint to > either send or receive to another user on the openfire/xmpp server, I am not > able to use the endpoint for simultaneous send and receive communication. > > Routes have been configured as: > camel.addRoutes(new RouteBuilder() { > public void configure() throws Exception { > > XmppEndpoint endpoint = new XmppEndpoint(); > endpoint.setCamelContext(camel); > endpoint.setHost("127.0.0.1"); > endpoint.setPort(5222); > endpoint.setUser("camel"); > endpoint.setPassword("camel"); > endpoint.setParticipant("[email protected]"); > camel.addEndpoint("xmppserver", endpoint); > > from("xmppserver").to("log:out?level=INFO"); > from("direct:toAdmin").to("xmppserver"); > } > }); > > I use the ProducerTemplate to send a message as: > template.sendBody("direct:toAdmin", "From template to admin...." + > System.currentTimeMillis()); > > If I comment out one of the routes above, the communication is flawless. > When I have both the routes configured the outbound/send (toAdmin) works, > but I am not able to receive messages. > > Analyzing this one step at a time, I found that initially I can receive the > messages. But, after I send out the first message via the endpoint, > subsequent receiving does not work. > > I am thinking of using this one-endpoint (xmpp) to send to and receive from > the peer application. Should I be configuring my routes differently? > > Would greatly appreciate any leads on this regard. Hi
There is a ticket recently added to JIRA about something with listeners in the smack library. Anyway just wanted to let you know that there could be an issue in there. Could you try to not use the same endpoint for both consumer and producer. Eg in your confiugure method create the XmppEndpoint 2 times. And use a different one for the consumer and the producer. So you do not reuse the same endpoint. > > Thanks, > Sameer. > -- > View this message in context: > http://www.nabble.com/Unable-to-simultaneously-send-and-receive-via-an-XMPP-endpoint.-tp24033774p24033774.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
