You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by mamouros <cs...@yahoo.gr> on 2013/10/01 13:09:35 UTC
Consumer template get stuck when calling receive() with SMPP uri
and getting a negative response.
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://8000800120@213.249.19.247: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.
Re: Consumer template get stuck when calling receive() with SMPP
uri and getting a negative response.
Posted by cursed_manji <jm...@gmail.com>.
Any news about this issue? I have the same problem, when the password for the
smsc is wrong, it does infinate attempts instead of stopping after a couple
of attempts.
--
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-tp5740666p5754300.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Consumer template get stuck when calling receive() with SMPP
uri and getting a negative response.
Posted by mamouros <cs...@yahoo.gr>.
Consumer/Producer was used because I had some problems I couldn't solve with
OSGi containers.
I changed it now to from..to.. route.
--
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-tp5740666p5741110.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Consumer template get stuck when calling receive() with SMPP uri
and getting a negative response.
Posted by Christian Müller <ch...@gmail.com>.
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 <cs...@yahoo.gr> 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://8000800120@213.249.19.247: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.
>