Skip to content
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

Add ability to set consumer priority with AmqpTemplate #1533

Closed
nreinhardt opened this issue Nov 15, 2022 · 2 comments · Fixed by #1534
Closed

Add ability to set consumer priority with AmqpTemplate #1533

nreinhardt opened this issue Nov 15, 2022 · 2 comments · Fixed by #1534

Comments

@nreinhardt
Copy link

Expected Behavior

It should be possible to configure consumer arguments when consuming with RabbitTemplate. In my particular use case, I would like to set the consumer priority when consuming with an AmqpTemplate instance.

Current Behavior

Currently, it is impossible to set the consumer arguments when consuming with AmqpTemplate.

Context

In my particular use case, I would like to:

  • Set the consumer priority to a particular value
  • Wait indefinitely until a message can be received.
  • Process the message, which may take several minutes.
  • Terminate the program

There is some documentation for configuring the consumer priority when performing asynchronous consumption. However, I haven't found a solution for synchronous consumption.

@nreinhardt
Copy link
Author

Prompted by Gary Russell. Thanks for the prompt response!

@garyrussell garyrussell self-assigned this Nov 15, 2022
@garyrussell garyrussell added this to the 3.0.0 milestone Nov 15, 2022
garyrussell added a commit to garyrussell/spring-amqp that referenced this issue Nov 15, 2022
Resolves spring-projects#1533

Allow setting consumer arguments when using non-zero receive
timeouts using the `RabbitTemplate`.

**cherry-pick to 2.4.x**
garyrussell added a commit to garyrussell/spring-amqp that referenced this issue Nov 15, 2022
Resolves spring-projects#1533

Allow setting consumer arguments when using non-zero receive
timeouts using the `RabbitTemplate`.

**cherry-pick to 2.4.x**
artembilan pushed a commit that referenced this issue Nov 15, 2022
Resolves #1533

Allow setting consumer arguments when using non-zero receive
timeouts using the `RabbitTemplate`.

**cherry-pick to 2.4.x**
artembilan pushed a commit that referenced this issue Nov 15, 2022
Resolves #1533

Allow setting consumer arguments when using non-zero receive
timeouts using the `RabbitTemplate`.

**cherry-pick to 2.4.x**

# Conflicts:
#	spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/RabbitTemplate.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants