Skip to content

Rename OverflowStrategy enum #82

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

Merged
merged 1 commit into from
Oct 9, 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
6 changes: 3 additions & 3 deletions src/main/java/com/rabbitmq/client/amqp/Management.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ interface QueueSpecification {
* @see <a href="https://www.rabbitmq.com/docs/maxlength#overflow-behaviour">Overflow
* Behavior</a>
*/
QueueSpecification overflowStrategy(OverFlowStrategy overflow);
QueueSpecification overflowStrategy(OverflowStrategy overflow);

/**
* Set TTL for a queue.
Expand Down Expand Up @@ -478,7 +478,7 @@ public String strategy() {
*
* @see <a href="https://www.rabbitmq.com/docs/maxlength#overflow-behaviour">Overflow Behavior</a>
*/
enum OverFlowStrategy {
enum OverflowStrategy {
/** Drop the messages at the head of the queue. The default strategy. */
DROP_HEAD("drop-head"),
/** Discard the most recent published messages. */
Expand All @@ -488,7 +488,7 @@ enum OverFlowStrategy {

private final String strategy;

OverFlowStrategy(String strategy) {
OverflowStrategy(String strategy) {
this.strategy = strategy;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public Management.QueueSpecification overflowStrategy(String overflow) {
}

@Override
public Management.QueueSpecification overflowStrategy(Management.OverFlowStrategy overflow) {
public Management.QueueSpecification overflowStrategy(Management.OverflowStrategy overflow) {
this.arg("x-overflow", overflow.strategy());
return this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/rabbitmq/client/amqp/impl/AmqpTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ void publishedMessageShouldBeRejectedWhenQueueLimitIsReached(TestInfo info) {
management
.queue(q)
.maxLength(maxLength)
.overflowStrategy(Management.OverFlowStrategy.REJECT_PUBLISH)
.overflowStrategy(Management.OverflowStrategy.REJECT_PUBLISH)
.declare();
CountDownLatch rejectedLatch = new CountDownLatch(1);
Publisher.Callback callback =
Expand Down