You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Willem Jiang <wi...@gmail.com> on 2010/11/01 09:17:32 UTC

Re: XMPP communication not closed and new message rejected

I just checked the code of XmppPrivateChatProducer, it doesn't close the 
connection even the Producer is stopped.

It's a bug of XMPP, I just create a JIRA[1] for it.

[1]http://camel.465427.n5.nabble.com/XMPP-communication-not-closed-and-new-message-rejected-td3236657.html#a3236657

On 10/27/10 9:03 PM, Alesque wrote:
>
> I'm using the Recipient List pattern to route dynamically messages to
> different XMPP accounts.
>
> I'm experienced the same issue. I noticed XMPP connections remain open in
> ejabberd.
>
> So the first message is routed, and when others occured, I've got an
> Exception because accounts are already connected with the default resource
> identifier Camel.
>
> If I set a resource identifier (UUID) randomly for each recipient that
> works, but connections remain open in ejabberd.
>
> Why XMPP connections remain open? Is this a bug? Is this the expected
> behaviour?
>
> Perhaps connections are pooled and the algorithm to get the connection
> related to a specific URI endpoint is broken.
>
> Any help would be greatly appreciated,
>
> Regards,
> Alexandre


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: XMPP communication not closed and new message rejected

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Nov 1, 2010 at 8:43 PM, Donald Whytock <dw...@gmail.com> wrote:
> If an XMPP endpoint is connected to both an incoming route and an
> outgoing route, the connection shouldn't be closed when the producer
> finishes.  Perhaps it can be an option, like the Mina connector?
>

Yeah an option is a good idea. Please fell free to create a JIRA and
if possible a patch.


> Don
>
> On Mon, Nov 1, 2010 at 5:03 AM, Willem Jiang <wi...@gmail.com> wrote:
>> On 11/1/10 4:17 PM, Willem Jiang wrote:
>>>
>>> I just checked the code of XmppPrivateChatProducer, it doesn't close the
>>> connection even the Producer is stopped.
>>>
>>> It's a bug of XMPP, I just create a JIRA[1] for it.
>>>
>>>
>>> [1]http://camel.465427.n5.nabble.com/XMPP-communication-not-closed-and-new-message-rejected-td3236657.html#a3236657
>>
>> The JIRA link should be
>> https://issues.apache.org/activemq/browse/CAMEL-3298
>>
>> BTW, I didn't have a chance to test the patch on XMPP Server.
>> Maybe we need to close the connection when the producer finish to send the
>> message.
>>
>>>
>>>
>>> On 10/27/10 9:03 PM, Alesque wrote:
>>>>
>>>> I'm using the Recipient List pattern to route dynamically messages to
>>>> different XMPP accounts.
>>>>
>>>> I'm experienced the same issue. I noticed XMPP connections remain open in
>>>> ejabberd.
>>>>
>>>> So the first message is routed, and when others occured, I've got an
>>>> Exception because accounts are already connected with the default
>>>> resource
>>>> identifier Camel.
>>>>
>>>> If I set a resource identifier (UUID) randomly for each recipient that
>>>> works, but connections remain open in ejabberd.
>>>>
>>>> Why XMPP connections remain open? Is this a bug? Is this the expected
>>>> behaviour?
>>>>
>>>> Perhaps connections are pooled and the algorithm to get the connection
>>>> related to a specific URI endpoint is broken.
>>>>
>>>> Any help would be greatly appreciated,
>>>>
>>>> Regards,
>>>> Alexandre
>>>
>>>
>>
>>
>> --
>> Willem
>> ----------------------------------
>> FuseSource
>> Web: http://www.fusesource.com
>> Blog:    http://willemjiang.blogspot.com (English)
>>         http://jnn.javaeye.com (Chinese)
>> Twitter: willemjiang
>>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: XMPP communication not closed and new message rejected

Posted by Donald Whytock <dw...@gmail.com>.
It would depend on outgoing message volume.  If there were enough
outgoing messages generated to run the connection at capacity,
re-connecting each time, with the handshaking involved, would slow
down the message flow.

Also, each time the producer connects a new flood of presence packets
is sent to the producer's contacts.  It might not be desirable to be
doing this many times every second.

On Mon, Nov 1, 2010 at 11:52 PM, Willem Jiang <wi...@gmail.com> wrote:
>
> On 11/2/10 3:43 AM, Donald Whytock wrote:
>>
>> If an XMPP endpoint is connected to both an incoming route and an
>> outgoing route, the connection shouldn't be closed when the producer
>> finishes.  Perhaps it can be an option, like the Mina connector?
>>
> Current XMPP endpoint doesn't manage the connection itself, it just provides
> a method of getting the connection.
> Is there any reason to keep the connection if the producer just want to send
> a message?
>
>
>> Don
>>
>> On Mon, Nov 1, 2010 at 5:03 AM, Willem Jiang<wi...@gmail.com>
>>  wrote:
>>>
>>> On 11/1/10 4:17 PM, Willem Jiang wrote:
>>>>
>>>> I just checked the code of XmppPrivateChatProducer, it doesn't close the
>>>> connection even the Producer is stopped.
>>>>
>>>> It's a bug of XMPP, I just create a JIRA[1] for it.
>>>>
>>>>
>>>>
>>>> [1]http://camel.465427.n5.nabble.com/XMPP-communication-not-closed-and-new-message-rejected-td3236657.html#a3236657
>>>
>>> The JIRA link should be
>>> https://issues.apache.org/activemq/browse/CAMEL-3298
>>>
>>> BTW, I didn't have a chance to test the patch on XMPP Server.
>>> Maybe we need to close the connection when the producer finish to send
>>> the
>>> message.
>>>
>>>>
>>>>
>>>> On 10/27/10 9:03 PM, Alesque wrote:
>>>>>
>>>>> I'm using the Recipient List pattern to route dynamically messages to
>>>>> different XMPP accounts.
>>>>>
>>>>> I'm experienced the same issue. I noticed XMPP connections remain open
>>>>> in
>>>>> ejabberd.
>>>>>
>>>>> So the first message is routed, and when others occured, I've got an
>>>>> Exception because accounts are already connected with the default
>>>>> resource
>>>>> identifier Camel.
>>>>>
>>>>> If I set a resource identifier (UUID) randomly for each recipient that
>>>>> works, but connections remain open in ejabberd.
>>>>>
>>>>> Why XMPP connections remain open? Is this a bug? Is this the expected
>>>>> behaviour?
>>>>>
>>>>> Perhaps connections are pooled and the algorithm to get the connection
>>>>> related to a specific URI endpoint is broken.
>>>>>
>>>>> Any help would be greatly appreciated,
>>>>>
>>>>> Regards,
>>>>> Alexandre
>>>>
>>>>
>>>
>>>
>>> --
>>> Willem
>>> ----------------------------------
>>> FuseSource
>>> Web: http://www.fusesource.com
>>> Blog:    http://willemjiang.blogspot.com (English)
>>>         http://jnn.javaeye.com (Chinese)
>>> Twitter: willemjiang
>>>
>>
>
>
> --
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>         http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
>

Re: XMPP communication not closed and new message rejected

Posted by Willem Jiang <wi...@gmail.com>.
On 11/2/10 3:43 AM, Donald Whytock wrote:
> If an XMPP endpoint is connected to both an incoming route and an
> outgoing route, the connection shouldn't be closed when the producer
> finishes.  Perhaps it can be an option, like the Mina connector?
>
Current XMPP endpoint doesn't manage the connection itself, it just 
provides a method of getting the connection.
Is there any reason to keep the connection if the producer just want to 
send a message?


> Don
>
> On Mon, Nov 1, 2010 at 5:03 AM, Willem Jiang<wi...@gmail.com>  wrote:
>> On 11/1/10 4:17 PM, Willem Jiang wrote:
>>>
>>> I just checked the code of XmppPrivateChatProducer, it doesn't close the
>>> connection even the Producer is stopped.
>>>
>>> It's a bug of XMPP, I just create a JIRA[1] for it.
>>>
>>>
>>> [1]http://camel.465427.n5.nabble.com/XMPP-communication-not-closed-and-new-message-rejected-td3236657.html#a3236657
>>
>> The JIRA link should be
>> https://issues.apache.org/activemq/browse/CAMEL-3298
>>
>> BTW, I didn't have a chance to test the patch on XMPP Server.
>> Maybe we need to close the connection when the producer finish to send the
>> message.
>>
>>>
>>>
>>> On 10/27/10 9:03 PM, Alesque wrote:
>>>>
>>>> I'm using the Recipient List pattern to route dynamically messages to
>>>> different XMPP accounts.
>>>>
>>>> I'm experienced the same issue. I noticed XMPP connections remain open in
>>>> ejabberd.
>>>>
>>>> So the first message is routed, and when others occured, I've got an
>>>> Exception because accounts are already connected with the default
>>>> resource
>>>> identifier Camel.
>>>>
>>>> If I set a resource identifier (UUID) randomly for each recipient that
>>>> works, but connections remain open in ejabberd.
>>>>
>>>> Why XMPP connections remain open? Is this a bug? Is this the expected
>>>> behaviour?
>>>>
>>>> Perhaps connections are pooled and the algorithm to get the connection
>>>> related to a specific URI endpoint is broken.
>>>>
>>>> Any help would be greatly appreciated,
>>>>
>>>> Regards,
>>>> Alexandre
>>>
>>>
>>
>>
>> --
>> Willem
>> ----------------------------------
>> FuseSource
>> Web: http://www.fusesource.com
>> Blog:    http://willemjiang.blogspot.com (English)
>>          http://jnn.javaeye.com (Chinese)
>> Twitter: willemjiang
>>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: XMPP communication not closed and new message rejected

Posted by Donald Whytock <dw...@gmail.com>.
If an XMPP endpoint is connected to both an incoming route and an
outgoing route, the connection shouldn't be closed when the producer
finishes.  Perhaps it can be an option, like the Mina connector?

Don

On Mon, Nov 1, 2010 at 5:03 AM, Willem Jiang <wi...@gmail.com> wrote:
> On 11/1/10 4:17 PM, Willem Jiang wrote:
>>
>> I just checked the code of XmppPrivateChatProducer, it doesn't close the
>> connection even the Producer is stopped.
>>
>> It's a bug of XMPP, I just create a JIRA[1] for it.
>>
>>
>> [1]http://camel.465427.n5.nabble.com/XMPP-communication-not-closed-and-new-message-rejected-td3236657.html#a3236657
>
> The JIRA link should be
> https://issues.apache.org/activemq/browse/CAMEL-3298
>
> BTW, I didn't have a chance to test the patch on XMPP Server.
> Maybe we need to close the connection when the producer finish to send the
> message.
>
>>
>>
>> On 10/27/10 9:03 PM, Alesque wrote:
>>>
>>> I'm using the Recipient List pattern to route dynamically messages to
>>> different XMPP accounts.
>>>
>>> I'm experienced the same issue. I noticed XMPP connections remain open in
>>> ejabberd.
>>>
>>> So the first message is routed, and when others occured, I've got an
>>> Exception because accounts are already connected with the default
>>> resource
>>> identifier Camel.
>>>
>>> If I set a resource identifier (UUID) randomly for each recipient that
>>> works, but connections remain open in ejabberd.
>>>
>>> Why XMPP connections remain open? Is this a bug? Is this the expected
>>> behaviour?
>>>
>>> Perhaps connections are pooled and the algorithm to get the connection
>>> related to a specific URI endpoint is broken.
>>>
>>> Any help would be greatly appreciated,
>>>
>>> Regards,
>>> Alexandre
>>
>>
>
>
> --
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>         http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
>

Re: XMPP communication not closed and new message rejected

Posted by Willem Jiang <wi...@gmail.com>.
On 11/1/10 4:17 PM, Willem Jiang wrote:
> I just checked the code of XmppPrivateChatProducer, it doesn't close the
> connection even the Producer is stopped.
>
> It's a bug of XMPP, I just create a JIRA[1] for it.
>
> [1]http://camel.465427.n5.nabble.com/XMPP-communication-not-closed-and-new-message-rejected-td3236657.html#a3236657
The JIRA link should be
https://issues.apache.org/activemq/browse/CAMEL-3298

BTW, I didn't have a chance to test the patch on XMPP Server.
Maybe we need to close the connection when the producer finish to send 
the message.

>
>
> On 10/27/10 9:03 PM, Alesque wrote:
>>
>> I'm using the Recipient List pattern to route dynamically messages to
>> different XMPP accounts.
>>
>> I'm experienced the same issue. I noticed XMPP connections remain open in
>> ejabberd.
>>
>> So the first message is routed, and when others occured, I've got an
>> Exception because accounts are already connected with the default
>> resource
>> identifier Camel.
>>
>> If I set a resource identifier (UUID) randomly for each recipient that
>> works, but connections remain open in ejabberd.
>>
>> Why XMPP connections remain open? Is this a bug? Is this the expected
>> behaviour?
>>
>> Perhaps connections are pooled and the algorithm to get the connection
>> related to a specific URI endpoint is broken.
>>
>> Any help would be greatly appreciated,
>>
>> Regards,
>> Alexandre
>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang