mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-09 23:40:05 +00:00
Call Stop at the end
This commit is contained in:
parent
dccfd9a776
commit
cfbb94aa32
@ -301,6 +301,9 @@ public abstract class AbstractEventConsumer
|
|||||||
offset += batchSize;
|
offset += batchSize;
|
||||||
commit(jobExecutionContext);
|
commit(jobExecutionContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Call stop to close the client
|
||||||
|
this.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public EventSubscription getEventSubscription() {
|
public EventSubscription getEventSubscription() {
|
||||||
|
|||||||
@ -17,4 +17,6 @@ import org.openmetadata.service.events.errors.EventPublisherException;
|
|||||||
|
|
||||||
public interface Alert<T> {
|
public interface Alert<T> {
|
||||||
void sendAlert(T event) throws EventPublisherException;
|
void sendAlert(T event) throws EventPublisherException;
|
||||||
|
|
||||||
|
void stop();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,12 +13,11 @@
|
|||||||
|
|
||||||
package org.openmetadata.service.apps.bundles.changeEvent;
|
package org.openmetadata.service.apps.bundles.changeEvent;
|
||||||
|
|
||||||
import io.dropwizard.lifecycle.Managed;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.openmetadata.service.events.errors.EventPublisherException;
|
import org.openmetadata.service.events.errors.EventPublisherException;
|
||||||
import org.quartz.JobExecutionContext;
|
import org.quartz.JobExecutionContext;
|
||||||
|
|
||||||
public interface Consumer<T> extends Managed {
|
public interface Consumer<T> {
|
||||||
List<T> pollEvents(long offset, long batchSize);
|
List<T> pollEvents(long offset, long batchSize);
|
||||||
|
|
||||||
void publishEvents(List<T> events);
|
void publishEvents(List<T> events);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user