-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#3214] Decouple readiness checks from verticle deployment #3223
[#3214] Decouple readiness checks from verticle deployment #3223
Conversation
...a/src/main/java/org/eclipse/hono/client/command/kafka/KafkaBasedInternalCommandConsumer.java
Outdated
Show resolved
Hide resolved
...nts/kafka-common/src/main/java/org/eclipse/hono/client/kafka/consumer/HonoKafkaConsumer.java
Outdated
Show resolved
Hide resolved
...nts/kafka-common/src/main/java/org/eclipse/hono/client/kafka/consumer/HonoKafkaConsumer.java
Outdated
Show resolved
Hide resolved
* | ||
* @return A succeeded future. Note that the successful completion of the returned future does not | ||
* mean that the consumer will be ready to receive messages from the broker. | ||
*/ | ||
@Override | ||
public Future<Void> start() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is currently
if (kafkaConsumer == null) {
return Future.failedFuture("not started");
in the stop()
method. The failed future there marked a programming error - calling stop()
before start()
.
Since kafkaConsumer
is now null
for some time after start()
is completed, the stop()
method should be adapted.
In case of kafkaConsumer == null
it would also be best to make the KafkaClientFactory
instance stop any further client creation attempts.
...nts/kafka-common/src/main/java/org/eclipse/hono/client/kafka/consumer/HonoKafkaConsumer.java
Outdated
Show resolved
Hide resolved
...nts/kafka-common/src/main/java/org/eclipse/hono/client/kafka/consumer/HonoKafkaConsumer.java
Show resolved
Hide resolved
The Kafka based clients have been adapted to provide a readiness check that is independent from the clients' startup. This is to better resemble the behavior of Hono's other components and also to not block the deployment of verticles during startup of Hono services and adapters. Fixes eclipse-hono#3214 Signed-off-by: Kai Hudalla <[email protected]>
05fc24f
to
df18da4
Compare
@calohmn would you mind taking another look? |
...a/src/main/java/org/eclipse/hono/client/command/kafka/KafkaBasedInternalCommandConsumer.java
Outdated
Show resolved
Hide resolved
...a/src/main/java/org/eclipse/hono/client/command/kafka/KafkaBasedInternalCommandConsumer.java
Outdated
Show resolved
Hide resolved
...a/src/main/java/org/eclipse/hono/client/command/kafka/KafkaBasedInternalCommandConsumer.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Kai Hudalla <[email protected]>
@calohmn I have pushed changes |
...a/src/main/java/org/eclipse/hono/client/command/kafka/KafkaBasedInternalCommandConsumer.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Kai Hudalla <[email protected]>
@calohmn I have pushed changes |
...a/src/main/java/org/eclipse/hono/client/command/kafka/KafkaBasedInternalCommandConsumer.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Kai Hudalla <[email protected]>
tests/src/test/java/org/eclipse/hono/tests/client/HonoKafkaConsumerIT.java
Show resolved
Hide resolved
Signed-off-by: Kai Hudalla <[email protected]>
@calohmn I have pushed a change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The Kafka based clients have been adapted to provide a readiness check
that is independent from the clients' startup. This is to better
resemble the behavior of Hono's other components and also to not block
the deployment of verticles during startup of Hono services and
adapters.
Fixes #3214