Reputation: 178
Using spring cloud stream with RabbitMQ with config:
spring:
rabbitmq:
host: localhost
port: 5672
username: rabbitmq
password: rabbitmq
cloud:
stream:
rabbit:
bindings:
organization-created-in-0:
consumer:
autoBindDlq: true
republishToDlq: true
bindings:
organization-created-in-0:
destination: vs.organizations.organization-created
content-type: application/json
group: requestGroup
maxAttempts: 3
The application does not connect to RabbitMQ. Exchange and Queue are not created when the application is running. If they have already been created, there is no connection anyway. If spring.cloud.function.declaration: organizationCreated
is added, the Exchange and Queue are created, but with the wrong name:
Exchange organizationCreated-in-0
instead vs.organizations.organization-created
and Queue organizationCreated-in-0.anonymous.z5pgPh4BT3SmlObBPQF4gw
instead vs.organizations.organization-created.requestGroup
. How fix it?
Upvotes: 0
Views: 264
Reputation: 174729
Given the declaration is defined as organizationCreated
(the method name), the binding name is organizationCreated-in-0
not organization-created-in-0
.
The method name is not hyphenated in the binding name, it is used unchanged.
Upvotes: 0