I don't know what your overall route looks like, but I think you will
need to tell an upstream messaging component to stop accepting new
messages, first, before calling context.stopRoute(rid) and also
configure the shutdown strategy to allow sufficient time
to process what was already in the queue:

ShutdownStrategy sds = context.getShutdownStrategy();
sds.setTimeout(120); //<== 2 minutes

On Mon, Mar 25, 2013 at 11:14 AM, fclose <[email protected]> wrote:
> Hello,
>
>
> like I explained in a previous post I'm looking for recommendations about
> how to stop a route listening for sms messages.
>
> Currently I'm stopping the route using the camel context
>
> camelContext.stopRoute(routeId);
>
> But doing so I'm losing some messages :
> Here is the description of the problem from the guys at smsc side :
>
> My application returns an error code FF (Hex) or 255 (Dec) before unbinding.
> Then SMSc will mark the message as an “invalid” and all next messages which
> will be sent  towards the same destination MSISDN will be put automatically
> to “undeliverable” and no delivery attempt will be made until the
> application connects again and starts accepting messages again for this
> destination MSISDN.
>
> As error code FF or 255 is not according the SMPP specifications, the SMSc
> will consider it as a permanent error (241).
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/SMPP-stop-route-problem-tp5729769.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to