[
https://issues.apache.org/jira/browse/CAMEL-6256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13633842#comment-13633842
]
Prakash Shetty commented on CAMEL-6256:
---------------------------------------
Thanks Willem for update.
I took only org.apache.camel.component.xmpp.XmppEndpoint class and testing my
application. It works fine and it is getting reconnected successfully and I
can send messages 2nd time onwards.
But one more issue poped up.
On restarting of Openfire XMPP server and recreation of same group chat room,
the connection is not re-joining to the particular groupchat room, but
connection is really connected and authenticated.
I can see the following error code in Openfire server.
<error code="406" type="modify"><not-acceptable
xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></message>
This comes generally, when user is not joined the groupchatroom.
I debuged the code. Following is the observation:
In ProducerCache's doGetProducer method, it will return old
'XmppGroupCHatProducer' through statement Producer answer = producers.get(key);
It is always not null even after XMPP restart. So it wont create new producer
and it wont call ServiceHelper.startService(answer); So
XmppGroupCHatProducer's doStart() wont be called.
One more strange thing is org.jivesoftware.smackx.muc.MultiUserChat's isJoined
is always true, event if connection is no joined the room. So we cannot use
this flag also to rejoin.
I am not sure how to solve this.
This issue is on 2.10.3
I feel, I need to check with whole new 2.11.0 codebase.
Or I probably need to raise one more defect..
> Camel xmpp dynamic router is not sending incoming messages to openfire upon
> first failed groupchatroom join
> -----------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-6256
> URL: https://issues.apache.org/jira/browse/CAMEL-6256
> Project: Camel
> Issue Type: Bug
> Components: camel-xmpp
> Affects Versions: 2.10.3
> Environment: camel xmpp routing with openfire xmpp server. Used
> groupchat configurations
> Reporter: Prakash Shetty
> Priority: Critical
> Labels: connection, groupchat, xmpp
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Reference :
> http://camel.465427.n5.nabble.com/Camel-xmpp-dynamic-router-is-not-connecting-to-openfire-td5730506.html#a5730537
> {code:xml}
> <camel:route id="eventSubscriber">
> <camel:from uri="ref:eventReceiverUri" />
> <camel:dynamicRouter>
> <camel:method ref="eventRouterBean"
> method="processEvent"/>
> </camel:dynamicRouter>
> </camel:route>
> {code}
> In eventRouterBean's processEvent method, we are building xmpp groupchat room
> url depending upon the message and forwading the same message into respective
> groupchatrooms.
> If resulting groupchat room is not existing, it will log message
> WARN 2013-04-05 17:55:48,190 (UnitOfWorkProcessor.java processAsync:162) -
> Caught unhandled exception while processing ExchangeId:
> ID-INGBTCPIC8NB038-63130-1365164745141-0-3
> org.apache.camel.FailedToCreateProducerException: Failed to create Producer
> for endpoint:
> Endpoint[xmpp://<ip>:5222/?password=******&resource=zone_4fc100e4-d004-4a0b-a7e2-7cf910585af6_51&room=zone_4fc100e4-d004-4a0b-a7e2-7cf910585af6_51%40conference.test.com&serviceName=ispf.com&user=messagepublisher%40test.com].
> Reason: not-allowed(405)
> at
> org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:395)
> at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:278)
> at
> org.apache.camel.processor.RoutingSlip.processExchange(RoutingSlip.java:280)
> at
> org.apache.camel.processor.RoutingSlip.doRoutingSlip(RoutingSlip.java:205)
> at
> org.apache.camel.processor.RoutingSlip.process(RoutingSlip.java:135)
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>
> and ......
> Caused by: not-allowed(405)
> at
> org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:501)
> at
> org.apache.camel.component.xmpp.XmppGroupChatProducer.doStart(XmppGroupChatProducer.java:84)
>
> at
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
> at
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)
> at
> org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:393)
> ... 40 more
> This is still fine.
> But issue is if I create a groupchat room in openfire, it should forward new
> incoming message to same groupchat room. But it is not forwarding.
> It is keep on logging error message as 'Not connected to the server'
> repeatedly for all messages.
> But if I restart the camel context, then it starts working.
> Looks like it is caching url and its connection as not allowed in dynamic
> router.
> What will be the solution?
> And even the exception is thowing at ProducerCache.doGetProducer()..
> So how to clear cache for failed connections?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira