Skip to content

Commit

Permalink
fix: prefetch (basicQos) set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
bamthomas committed Sep 16, 2024
1 parent 2cab58c commit dc380f5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/
public class Configuration {
private static final int DEFAULT_CONNECTION_RECOVERY_DELAY = 5000;
private static final int DEFAULT_PREFETCH_NUMBER = 1;
public final String host;
public final int port;
public final String user;
Expand Down Expand Up @@ -40,7 +41,7 @@ public Configuration(URI amqpAddress) {
stream(query.split("&")).
collect(Collectors.toMap(kv -> kv.split("=")[0], kv -> kv.split("=")[1]));
rabbitMq = Boolean.parseBoolean(ofNullable(properties.get("rabbitMq")).orElse("true"));
nbMaxMessages = Integer.parseInt(ofNullable(properties.get("nbMaxMessages")).orElse("100"));
nbMaxMessages = Integer.parseInt(ofNullable(properties.get("nbMaxMessages")).orElse(String.valueOf(DEFAULT_PREFETCH_NUMBER)));
requeueDelay = Integer.parseInt(ofNullable(properties.get("requeueDelay")).orElse("30"));
String connectionRecoveryDelayStr = properties.get("recoveryDelay");
connectionRecoveryDelay = connectionRecoveryDelayStr == null ?
Expand Down

0 comments on commit dc380f5

Please sign in to comment.