You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Chaouki Dhib <ch...@gmail.com> on 2016/07/25 10:09:15 UTC
Graceful shutdown of Qpid JMS and more specifically Netty in a Spring webapp
Hello,
I'm building a web application that uses Spring and is deployed on a
Tomcat 8.0 server. In the application, I have successfully integrated
Qpid JMS (using Spring JMS) to both send messages (by jmsTemplate) and
receive messages (by DefaultMessageListenerContainer).
The issue I'm having is when I shutdown my application, I get several
log messages that indicated that some Netty component was not properly
shutdown.
the log can be found here:
https://gist.github.com/chaodhib/503c2c777d8ff3b546d7c2285a5ea1a4
The root cause seems to be the call to NettyTcpTransport.close(). In
this method,
group.shutdownGracefully() is called but that method returns a Future
and finishes instantly. I suppose the Spring container need to wait
for the Future callback somehow.
Any idea on how to achieve this?
Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Graceful shutdown of Qpid JMS and more specifically Netty in a
Spring webapp
Posted by Robbie Gemmell <ro...@gmail.com>.
On 25 July 2016 at 11:09, Chaouki Dhib <ch...@gmail.com> wrote:
> Hello,
>
> I'm building a web application that uses Spring and is deployed on a
> Tomcat 8.0 server. In the application, I have successfully integrated
> Qpid JMS (using Spring JMS) to both send messages (by jmsTemplate) and
> receive messages (by DefaultMessageListenerContainer).
>
> The issue I'm having is when I shutdown my application, I get several
> log messages that indicated that some Netty component was not properly
> shutdown.
>
> the log can be found here:
> https://gist.github.com/chaodhib/503c2c777d8ff3b546d7c2285a5ea1a4
>
> The root cause seems to be the call to NettyTcpTransport.close(). In
> this method,
> group.shutdownGracefully() is called but that method returns a Future
> and finishes instantly. I suppose the Spring container need to wait
> for the Future callback somehow.
>
> Any idea on how to achieve this?
>
> Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
The client should itself be waiting for that to shut down, we'll take
a look at it. Though I think Netty may have its own independantly,
which could prove trickier.
In either case I dont think this should cause you problems other than
the 'already stopped' logging in the mean time.
Even once waiting for it, the earlier logging may or may not persist,
that would depend on what Netty does there.
Robbie
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org