Vertx, Verticle and closing sockets

53 views
Skip to first unread message

Patrick Daures

unread,
Apr 7, 2024, 4:44:01 PMApr 7
to vert.x
Hi all,

I'm new to Vertx, I'm building very simple applications consuming UDP multicast messages, doing some business logic on messages, then publishing new UDP messages.

I have 3 verticles:
ReceiverVerticle
ProcessingVerticle
SenderVerticle

Question: 
1) as ReceiverVerticle and SenderVerticle, should I make sure that the socket is properly closed when the application is stopped?

2) how can I ensure that the stop method is properly called in my application?

Thanks
Patrick

Julien Viet

unread,
Apr 11, 2024, 4:09:36 AMApr 11
to ve...@googlegroups.com
Hi,

when you close the vertx instance, it will close all resources that
were created and the verticle will be stopped before.

you can close the socket in your verticles.

I am not sure what you mean by 2/, vertx will call stop on the
verticle when you close the instance.

Julien
> --
> You received this message because you are subscribed to the Google Groups "vert.x" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/ae7c2feb-4e78-4da3-bec0-4e54d38c912fn%40googlegroups.com.

Patrick Daures

unread,
Apr 11, 2024, 9:03:31 AMApr 11
to vert.x
Great,
Thanks for your answer and bonne journée!
Reply all
Reply to author
Forward
0 new messages