0
votes

I am creating a spring cloud stream app for use with SCDF streams. I am trying to set the max-priority property of the consumer binding from application properties. But the queue that gets created is not priority queue. I am able to create priority queue if I pass maxPriority as deployer property while creating the stream.

The settings I used in my yaml are as follows:-

spring:
  cloud: 
    stream: 
      rabbit: 
        bindings: 
          input:
            consumer:
              maxPriority: 10

I am using spring cloud rabbit binder version 2.1.3.Release

Can this property not be set using application yml file? I have a lot of applications in the stream and passing this property via deployer properties is extremely cumbersome.

1

1 Answers

0
votes

I just copied your YAML and it works fine for me

enter image description here

spring:
  cloud: 
    stream: 
      rabbit: 
        bindings: 
          input:
            consumer:
              maxPriority: 10
      bindings:
        input:
          group: foo

The fact that it works for you via the deployer is suspicious; the runtime code is oblivious to how the properties are actually set. So, your YAML is not being used for some reason.

EDIT

It works for me with a config server too.

http://localhost:8080/actuator/env

enter image description here

enter image description here

EDIT

With an anonymous consumer:

enter image description here

enter image description here