We are creating a rabbitMq consumer using the new spring cloud function library.
However we find that on startup of the application, we don't see the queues or exchanges create on the rabbitMq instance.
Here is our config.
spring:
cloud:
function:
definition: someReceiver
stream:
binders:
rabbit:
type: rabbit
bindings:
someReceiver-in-0:
consumer:
max-attemps: 1
batch-mode: true
binder: rabbit
destination: someExhange
group: someQueue
default-binder: rabbit
rabbit:
bindings:
someReceiver-in-0:
consumer:
acknowledge-mode: MANUAL
auto-bind-dlq: true
queue-name-group-only: true
exchange-type: topic
max-concurrency: 10
prefetch: 200
enable-batching: true
batch-size: 10
receive-timeout: 200
dlq-dead-letter-exchange:
This is our consumer.
@Bean
public Consumer<Message<Long>> someReceiver() {
return ....
}
In logs we can see :
o.s.i.monitor.IntegrationMBeanExporter : Registering MessageChannel errorChannel
o.s.i.monitor.IntegrationMBeanExporter : Registering MessageChannel nullChannel
o.s.i.monitor.IntegrationMBeanExporter : Registering MessageHandler _org.springframework.integration.errorLogger
o.s.i.endpoint.EventDrivenConsumer : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
o.s.i.channel.PublishSubscribeChannel : Channel 'X' has 1 subscriber(s).
The problem we are having is that no queue or exchange is being created on the rabbitMq broker on application startup.
We were expecting that a queue named someQueue and an exchanged named someExchange should have been created on application startup
