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.