Error SmppConsumer - recconect runnable is scheduled even if maxReconnect is set 0

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error SmppConsumer - recconect runnable is scheduled even if maxReconnect is set 0

Lutor, Zoltan (Nokia - HU/Budapest)
Hi,

It seems there is some bug in SmppConsumer  (https://github.com/apache/camel/blob/master/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java#L134):
 - in case of unsuccessful connection/binding attempts it spawns a reconnect thread going to sleep for initialReconnectDelay even if configured max number of reconnection attempt is set to zero.
 - since thread spawning  the new reconnection runnable is blocked for waiting for rejoining this thread, so blocked the application initiating SMPP connection  setup from e.g. adding a route into the context...
 - it makes implementation of own handling of initial connection errors or own reconnection handling strategy rather ineffective

Lucky us, fix is rather easy: spawn reconnect runnable if and only if maxReconnect URL parameter is greater than zero...

I'm new to this community, so please advise on how an issue for tracking this problem to be created and how a fix can be provided.

Thx,

Zoltan


Reply | Threaded
Open this post in threaded view
|

RE: Error SmppConsumer - recconect runnable is scheduled even if maxReconnect is set 0

Lutor, Zoltan (Nokia - HU/Budapest)
Hi,

It seems there is some bug in SmppConsumer  (https://github.com/apache/camel/blob/master/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java#L134):
 - in case of unsuccessful connection/binding attempts it spawns a reconnect thread going to sleep for initialReconnectDelay even if configured max number of reconnection attempt is set to zero.
 - since thread spawning  the new reconnection runnable is blocked for waiting for rejoining this thread, so blocked the application initiating SMPP connection  setup from e.g. adding a route into the context...
 - it makes implementation of own handling of initial connection errors or own reconnection handling strategy rather ineffective

Lucky us, fix is rather easy: spawn reconnect runnable if and only if maxReconnect URL parameter is greater than zero...

I'm new to this community, so please advise on how an issue for tracking this problem to be created and how a fix can be provided.

Thx,

Zoltan


Reply | Threaded
Open this post in threaded view
|

Re: Error SmppConsumer - recconect runnable is scheduled even if maxReconnect is set 0

Andrea Cosentino-3
Hello,

Please have a look here:
https://camel.apache.org/manual/latest/contributing.html

The active branches actually are only master (for camel 3 development) and
2.25.x (for camel 2.x)

Thanks.

Il giorno ven 10 apr 2020 alle ore 11:20 Lutor, Zoltan (Nokia -
HU/Budapest) <[hidden email]> ha scritto:

> Hi,
>
> It seems there is some bug in SmppConsumer  (
> https://github.com/apache/camel/blob/master/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java#L134
> ):
>  - in case of unsuccessful connection/binding attempts it spawns a
> reconnect thread going to sleep for initialReconnectDelay even if
> configured max number of reconnection attempt is set to zero.
>  - since thread spawning  the new reconnection runnable is blocked for
> waiting for rejoining this thread, so blocked the application initiating
> SMPP connection  setup from e.g. adding a route into the context...
>  - it makes implementation of own handling of initial connection errors or
> own reconnection handling strategy rather ineffective
>
> Lucky us, fix is rather easy: spawn reconnect runnable if and only if
> maxReconnect URL parameter is greater than zero...
>
> I'm new to this community, so please advise on how an issue for tracking
> this problem to be created and how a fix can be provided.
>
> Thx,
>
> Zoltan
>
>
>