I think we can improve this. I will have a look at it...
But I'm wondering why do you use a consumer template to receive the short
messages and not a normal route like:
from("smpp://...")
.to("...");
Best,
Christian
-----------------
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 Tue, Oct 1, 2013 at 1:09 PM, mamouros <[email protected]> wrote:
> I am using the consumer template to receive deliver_sm from an smsc.
>
> exchange = consumer.receive("smpp://" + username + "@" + destination + ":"
> +
> port + "?password=" + password , timeoutInMillis);
>
> So far, so good but when it can't connect to the smsc (maybe because of
> wrong username or password), the smsc returns:
>
> p - 2.1.0.4 | Receive negative bind response
> org.jsmpp.extra.NegativeResponseException: Negative response 0000000e found
>
> and then tries to reconnect for ever:
>
> 2013-10-01 13:25:26,790 | INFO | Thread-1642 | SmppConsumer
> | el.component.smpp.SmppConsumer$2 155 | 172 - org.apache.camel.camel-smpp
> - 2.11.0 | Trying to reconnect to smpp://[email protected]:3333 -
> attempt #85...
>
> I don't want it to try to reconnect for ever and getting stuck there. I
> would like to continue after it gets a negative bind response and move on
> so
> it can call the route again.
> How could I do this.
>
> Tried with error handler in context:
>
> <errorHandler id="defaultEH2" type="DefaultErrorHandler" >
> <redeliveryPolicy asyncDelayedRedelivery="true"
> maximumRedeliveries="2"
> redeliveryDelay="1000"
> retryAttemptedLogLevel="WARN" />
> </errorHandler>
>
> and with try() catch() block surrounding the consumer.receive()
>
> but nothing..
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Consumer-template-get-stuck-when-calling-receive-with-SMPP-uri-and-getting-a-negative-response-tp5740666.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>