Skip to content
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

Intermediate metric consumer fix #8

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion prediction-orchestrator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
<version>4.3</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public void onMessage(String key, String address, Map body, Message message, Con
context.registerConsumer(new RealtimeApplicationMetricConsumer(app_id));
break;
case "intermediate":
context.registerConsumer(new IntermediateMetricsConsumer(predictionRegistry));
break;
default:
log.warn("Unknown mode: {}", mode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import eu.nebulouscloud.exn.core.Consumer;
import eu.nebulouscloud.exn.settings.StaticExnConfig;
import eu.nebulouscloud.predictionorchestrator.Orchestrator;
import eu.nebulouscloud.predictionorchestrator.PredictionRegistry;
import eu.nebulouscloud.predictionorchestrator.Properties;
import eu.nebulouscloud.predictionorchestrator.communication.consumers.IntermediateMetricsConsumer;
import eu.nebulouscloud.predictionorchestrator.communication.consumers.MetricsListConsumer;
import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
Expand Down Expand Up @@ -48,6 +50,9 @@ public class BrokerConnector {
@Autowired
private BrokerConnectorHandler brokerConnectorHandler;

@Autowired
private PredictionRegistry predictionRegistry;

@PostConstruct
public void init() {
startConnector();
Expand All @@ -61,7 +66,9 @@ private void startConnector() {
brokerConnectorHandler,
List.of(), // List of publishers
List.of(new Consumer("ui_app_messages", app_creation_channel,
applicationCreationHandler, true, true), new MetricsListConsumer(orchestrator, properties)),
applicationCreationHandler, true, true),
new MetricsListConsumer(orchestrator, properties),
new IntermediateMetricsConsumer(predictionRegistry)),
true, // enableState
true, // enableHealth
new StaticExnConfig(host, port, username, password, retryAttempts) // Configuration
Expand Down