Call Stop at the end

This commit is contained in:
mohitdeuex 2024-01-17 10:51:29 +05:30
parent dccfd9a776
commit cfbb94aa32
3 changed files with 6 additions and 2 deletions

View File

@ -301,6 +301,9 @@ public abstract class AbstractEventConsumer
offset += batchSize;
commit(jobExecutionContext);
}
// Call stop to close the client
this.stop();
}
public EventSubscription getEventSubscription() {

View File

@ -17,4 +17,6 @@ import org.openmetadata.service.events.errors.EventPublisherException;
public interface Alert<T> {
void sendAlert(T event) throws EventPublisherException;
void stop();
}

View File

@ -13,12 +13,11 @@
package org.openmetadata.service.apps.bundles.changeEvent;
import io.dropwizard.lifecycle.Managed;
import java.util.List;
import org.openmetadata.service.events.errors.EventPublisherException;
import org.quartz.JobExecutionContext;
public interface Consumer<T> extends Managed {
public interface Consumer<T> {
List<T> pollEvents(long offset, long batchSize);
void publishEvents(List<T> events);