You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After usage of nats java client with spring-boot-starter I found such inconvenient moments:
Connection implements Autoclosable and it's called during Spring Applicaiton Shutdown but I'm expecting that drain() will be called as well. In this case I need to implement some Spring DispoasableBean and call drain there. 😞 Proposal: include drain() in close().
I have an application that uses Nats. That part of the application is not critical and it's ok if for some period that Nats Cluster will be down. So if Nats Cluster is not up and running I can't:
start application
scale-up already running application
because Nats.connect() will throw an exception and my spring context will not be constructed and application startup fail. Proposal: Maybe return some lazy connection that will try to connect during call some of its interface. But here could be a problem with subscribers that should be created for example in @PostConstruct method.
The text was updated successfully, but these errors were encountered:
Hi guys,
After usage of nats java client with spring-boot-starter I found such inconvenient moments:
Connection implements Autoclosable and it's called during Spring Applicaiton Shutdown but I'm expecting that
drain()
will be called as well. In this case I need to implement some SpringDispoasableBean
and call drain there. 😞Proposal: include
drain()
inclose()
.I have an application that uses Nats. That part of the application is not critical and it's ok if for some period that Nats Cluster will be down. So if Nats Cluster is not up and running I can't:
because
Nats.connect()
will throw an exception and my spring context will not be constructed and application startup fail.Proposal: Maybe return some lazy connection that will try to connect during call some of its interface. But here could be a problem with subscribers that should be created for example in
@PostConstruct
method.The text was updated successfully, but these errors were encountered: