You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ray Slater <ra...@gmail.com> on 2013/04/10 16:55:39 UTC

Route failure on startup for SMPP consumer if SMSC down

Hi , I'm trying to set up a route to process incoming SMS. Everything works
fine if the SMSC is available and accepts the ESME connection on startup,
and it can handle connection failures, etc. However if the initial
connection attempt fails (eg if the SMSC is not accessible) then the route
fails (java.io.IOException: Connection refused) and the camel context shuts
everything down.

The config is something like this:

        <route id="recievesmsroute">
            <from
uri="smpp://rx@smsc:2775?password=pwd&amp;lazySessionCreation=true&amp;initialReconnectDelay=10000&amp;reconnectDelay=10000&amp;enquireLinkTimer=30000&amp;transactionTimer=10000&amp;systemType=consumer"/>
            <to uri="bean:receivesms" />
        </route>

The "lazySessionCreation=true" parameter seems to work if the SMPP
connection is a producer, but not if it is a consumer.

Is there any way around this so I can get the route to retry the initial
connect (without blocking the startup of other routes) just as it does once
established when the connection is lost?

Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/Route-failure-on-startup-for-SMPP-consumer-if-SMSC-down-tp5730666.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Route failure on startup for SMPP consumer if SMSC down

Posted by Ray Slater <ra...@gmail.com>.
Ah. I've just seen the following Jira which suggests that
"lazySessionCreation" was only implemented for the producer.

https://issues.apache.org/jira/browse/CAMEL-3853



--
View this message in context: http://camel.465427.n5.nabble.com/Route-failure-on-startup-for-SMPP-consumer-if-SMSC-down-tp5730666p5730667.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Route failure on startup for SMPP consumer if SMSC down

Posted by JasonN <ja...@googlemail.com>.
"Would like to get some more thoughts whether we should add this feature or
not."

I would see this as a big improvement for the smpp component.

Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/Route-failure-on-startup-for-SMPP-consumer-if-SMSC-down-tp5730666p5735799.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Route failure on startup for SMPP consumer if SMSC down

Posted by Christian Müller <ch...@gmail.com>.
For similar components (Netty, Mina, ...) we also fail at start up, if the
server is not available.

For camel-jms we have an option to start the listener async. If this fails,
we log a WARN and do not try to connect again (may the message listener
internally try to reconnect a few times). The documentation also says
"beware that if the connection could not be established ... the consumer
will not be able to receive messages"

Would like to get some more thoughts whether we should add this feature or
not.

Best,

Christian Müller
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Thu, Apr 11, 2013 at 9:44 AM, Ray Slater <ra...@gmail.com>wrote:

> The SMSC may be high availability, however the connection to it may not.
> High
> availability may be achieved by having multiple consumers from different
> load sharing SMSC. The SMSC may reject the bind if it is too busy, or a
> specific ESME may only be allowed to operate eg at off-peak times.
>
> Not common, no, but there are a number of reasons why the initial bind may
> fail. You could make the same argument for failing the producer if the
> initial bind doesn't work - if you don't test the route you wont know if
> it's configured correctly.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Route-failure-on-startup-for-SMPP-consumer-if-SMSC-down-tp5730666p5730707.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Route failure on startup for SMPP consumer if SMSC down

Posted by Ray Slater <ra...@gmail.com>.
The SMSC may be high availability, however the connection to it may not. High
availability may be achieved by having multiple consumers from different
load sharing SMSC. The SMSC may reject the bind if it is too busy, or a
specific ESME may only be allowed to operate eg at off-peak times.

Not common, no, but there are a number of reasons why the initial bind may
fail. You could make the same argument for failing the producer if the
initial bind doesn't work - if you don't test the route you wont know if
it's configured correctly.



--
View this message in context: http://camel.465427.n5.nabble.com/Route-failure-on-startup-for-SMPP-consumer-if-SMSC-down-tp5730666p5730707.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Route failure on startup for SMPP consumer if SMSC down

Posted by Christian Müller <ch...@gmail.com>.
I don't think it's a good feature for the consumer site. If you miss
configured your SMPP consumer, it will try and try and ... and try to
connect to the SMSC and you will never receive a message (and you will may
not recognize this problem for a long time).

A SMSC (for production) should be high available in my opinion...

Best,
Christian


On Wed, Apr 10, 2013 at 4:55 PM, Ray Slater <ra...@gmail.com>wrote:

> Hi , I'm trying to set up a route to process incoming SMS. Everything works
> fine if the SMSC is available and accepts the ESME connection on startup,
> and it can handle connection failures, etc. However if the initial
> connection attempt fails (eg if the SMSC is not accessible) then the route
> fails (java.io.IOException: Connection refused) and the camel context shuts
> everything down.
>
> The config is something like this:
>
>         <route id="recievesmsroute">
>             <from
> uri="smpp://rx@smsc
> :2775?password=pwd&amp;lazySessionCreation=true&amp;initialReconnectDelay=10000&amp;reconnectDelay=10000&amp;enquireLinkTimer=30000&amp;transactionTimer=10000&amp;systemType=consumer"/>
>             <to uri="bean:receivesms" />
>         </route>
>
> The "lazySessionCreation=true" parameter seems to work if the SMPP
> connection is a producer, but not if it is a consumer.
>
> Is there any way around this so I can get the route to retry the initial
> connect (without blocking the startup of other routes) just as it does once
> established when the connection is lost?
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Route-failure-on-startup-for-SMPP-consumer-if-SMSC-down-tp5730666.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>