Skip to content

Commit

Permalink
Make the RMQ request handler depending on the rate limit gate
Browse files Browse the repository at this point in the history
  • Loading branch information
penguineer committed Nov 5, 2024
1 parent f6a39b1 commit 17f021b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;

@Configuration
@EnableRabbit
Expand All @@ -22,6 +23,7 @@ public Queue chatRequestsQueue() {
}

@Bean
@DependsOn("rateLimitGate")
public SimpleMessageListenerContainer chatRequestsContainer(ConnectionFactory connectionFactory,
ChatRequestHandler handler) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
Expand Down

0 comments on commit 17f021b

Please sign in to comment.