Skip to content

Commit

Permalink
RabbitMQConfiguration: add getter for quorumQueueReplicationFactor (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
quantranhong1999 authored Dec 5, 2024
1 parent b6ed512 commit 6a11b2e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,10 @@ public Optional<Integer> getQuorumQueueDeliveryLimit() {
return quorumQueueDeliveryLimit;
}

public int getQuorumQueueReplicationFactor() {
return quorumQueueReplicationFactor;
}

public boolean eventBusPropagateDispatchError() {
return eventBusPropagateDispatchError;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,22 @@ void hostsShouldParseIfSpecified() {
Host.from("rabbitmqhost2", 5672));
}

@Test
void shouldReturnQuorumQueueReplicationFactorWhenConfigured() {
PropertiesConfiguration configuration = new PropertiesConfiguration();
String amqpUri = "amqp://james:james@rabbitmqhost:5672";
configuration.addProperty("uri", amqpUri);
String managementUri = "http://james:james@rabbitmqhost:15672/api/";
configuration.addProperty("management.uri", managementUri);
configuration.addProperty("management.user", DEFAULT_USER);
configuration.addProperty("management.password", DEFAULT_PASSWORD_STRING);

configuration.addProperty("quorum.queues.replication.factor", 3);

assertThat(RabbitMQConfiguration.from(configuration).getQuorumQueueReplicationFactor())
.isEqualTo(3);
}

@Nested
class SSLConfigurationTest {

Expand Down

0 comments on commit 6a11b2e

Please sign in to comment.