https://kotlinlang.org logo
#http4k
Title
# http4k
l

Luis Mirabal

10/27/2019, 4:35 PM
Hi, is there a way to add additional behaviour to
server.start()
? so that a connection to a message broker can be established on start, other than implementing the
Http4kServer
interface myself
It’s not that the connection to the message broker depends on the server but it’d be good to synchronise the start of the 2. Now thinking about it, maybe I can have another abstraction on top of the 2 that calls start on the server and on the broker connection
s

s4nchez

10/27/2019, 4:52 PM
That’s similar to the approach we have taken on projects: we have a “server” abstraction where one (or more) service(s) (http or otherwise) can be setup and started/stopped in a consistent way
l

Luis Mirabal

10/27/2019, 4:54 PM
Thanks for the prompt reply! Sometimes you need to talk about things to realise what the solution is 😁
s

s4nchez

10/27/2019, 4:56 PM
You’re welcome! simple smile
l

Luis Mirabal

10/28/2019, 12:29 PM
Thanks @dave I’ll keep this option in mind
4 Views