-
Couldn't load subscription status.
- Fork 74
Closed
Labels
type: featureA new feature or enhacementA new feature or enhacement
Milestone
Description
Application fails to connect to Pulsar; however, it swallows / logs the exception and does not restart
Is there anyway to add a configuration so that if a failure to connect to Pulsar happens on boot, it restarts?
For context this is what happened:
We applied a rolling restart to all of our applications
Spring Boot Pulsar Client tried to connect to pulsar; however, pulsar was not finished spinning up.
So, Pulsar just gave us back connection refused.
Error was like this:
java.util.concurrent.CompletionException: org.apache.pulsar.shade.io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: \"},{\"attempt\":5,\"error\":\"java.util.concurrent.CompletionException:
org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: org.apache.pulsar.shade.io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: \"},{\"attempt\":6,\"error\":\"java.util.concurrent.CompletionException:
org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: org.apache.pulsar.shade.io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: \"}]}\n\tat org.apache.pulsar.client.api.PulsarClientException.unwrap(PulsarClientException.java:1074)\n\tat org.apache.pulsar.client.impl.ConsumerBuilderImpl.subscribe(ConsumerBuilderImpl.java:104)\n\tat
org.springframework.pulsar.core.DefaultPulsarConsumerFactory.createConsumer(DefaultPulsarConsumerFactory.java:89)\n\tat org.springframework.pulsar.listener.DefaultPulsarMessageListenerContainer$Listener.<init>(DefaultPulsarMessageListenerContainer.java:298)\n\tat org.springframework.pulsar.listener.DefaultPulsarMessageListenerContainer.doStart(DefaultPulsarMessageListenerContainer.java:126)\n\tat org.springframework.pulsar.listener.AbstractPulsarMessageListenerContainer.start(AbstractPulsarMessageListenerContainer.java:110)\n\tat
Final note, this is my first time submitting an issue on an open source project. If I goofed up just let me know please.
Metadata
Metadata
Assignees
Labels
type: featureA new feature or enhacementA new feature or enhacement