Skip to content

Commit

Permalink
Prepare for Mutiny queues refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jponge committed Jan 22, 2024
1 parent e1aaf7b commit 443a925
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

<micrometer.version>1.12.2</micrometer.version>

<mutiny.version>2.5.3</mutiny.version>
<mutiny.version>999-SNAPSHOT</mutiny.version>
<artemis.version>2.31.2</artemis.version>
<commons-io.version>2.15.1</commons-io.version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.eclipse.microprofile.reactive.messaging.Incoming;
import org.eclipse.microprofile.reactive.messaging.Outgoing;

import io.smallrye.mutiny.helpers.queues.Queues;
import io.smallrye.mutiny.infrastructure.Infrastructure;
import io.smallrye.reactive.messaging.*;
import io.smallrye.reactive.messaging.EmitterConfiguration;
import io.smallrye.reactive.messaging.PublisherDecorator;
Expand Down Expand Up @@ -114,12 +114,12 @@ private int getWorkerMaxConcurrency(MediatorConfiguration configuration) {
String poolName = configuration.getWorkerPoolName();
// if the poll name is null we are on the default worker pool, set the default concurrent requests
if (poolName == null) {
return Queues.BUFFER_S;
return Infrastructure.getBufferSizeS();
}
String concurrencyConfigKey = WORKER_CONFIG_PREFIX + "." + poolName + "." + WORKER_CONCURRENCY;
Optional<Integer> concurrency = configInstance.get().getOptionalValue(concurrencyConfigKey, Integer.class);
// Fallback to the default concurrent requests if setting is not found
return concurrency.orElse(Queues.BUFFER_S);
return concurrency.orElse(Infrastructure.getBufferSizeS());
}

public Map<String, Integer> getIncomingConcurrency(MediatorConfiguration configuration) {
Expand Down

0 comments on commit 443a925

Please sign in to comment.