Hello!
My problem is that I would like to have a way to stop some endpoints
so they don't receive messages.
My problem is that before redeploying some http service I would like
to wait some time so every message that is processed at the moment is
finished. Of course at that time I cannot consume any new message from
the endpoint.

If everything is executed in transaction that can be rolled back, then
there is no problem, but my flow contains http endpoint that cannot be
rolled back, so I shouldn't rollback my original message if it hit the
http endpoint.

Best way for me is to stop jms consumer endpoint (that is at the very
begining of the flow), wait until all exchanges are processed, and
then shut down the context.

I've seen that those consumers are not exposed by JMX - only routes
are and they can be stopped. But the problem is that ServiceSupport
doesn't allow me to start a service that was previously stopped,
because when I do that, this service has started==true and
stopped=true and it cannot be used then (I've already implemented this
stop() and start() methods of ManagedRoute to stop/start all
route.getServicesForRoute() services).

My question is if ServiceSupport should allow me to start->stop->start
or it is forbidden by default and there is important reason it is done
this way?

The second question is if I should solve my problem this way? Maybe
there are different ideas about such problems?

Thanks for any answer,
Romek

Reply via email to