You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I am facing an issue with consumer declaration in the rabbitMQ fanout design, please take a look below details and let me know if there is any fix for this, thanks in advance.
I have the following configs for a fanout implementation:
#consumer in service B
spring.cloud.stream.bindings.onXYZUpdate-in-0.destination: update.v1.send-event
spring.cloud.stream.bindings.onXYZUpdate-in-0.group: sms
spring.cloud.stream.rabbit.bindings.onXYZUpdate-in-0.consumer.exchange-type: fanout
spring.cloud.stream.rabbit.bindings.onXYZUpdate-in-0.consumer.dlqName: .update.v1.send-event.sms.dlq
spring.cloud.stream.rabbit.bindings.onXYZUpdate-in-0.consumer.auto-bind-dlq: true
spring.cloud.stream.rabbit.bindings.onXYZUpdate-in-0.consumer.republishToDlq: true
`
The consumer in service A is working fine and it is the only consumer in that service. However, the consumer in B is not working and exists with two other consumers related to different functionality. To add service-B's queue to the fanout exchange I had to add the following config, which was is required in any other consumers we are having.
All the consumer declarations and the configs are similar, but an inbound queue is not getting declared for this consumer. I know that because the other two consumers in the service are logging the below log lines, but this one doesn't.
20:46:23.352 [main] [MEMBER_ID: ] [USER_ID: ] [] INFO RabbitExchangeQueueProvisioner.doProvisionConsumerDestination: [line:243] - declaring queue for inbound: <bindingName>.<group name>, bound to: <destination>
The text was updated successfully, but these errors were encountered:
Hi there, I am facing an issue with consumer declaration in the rabbitMQ fanout design, please take a look below details and let me know if there is any fix for this, thanks in advance.
I have the following configs for a fanout implementation:
Producer
spring.cloud.stream.bindings.sendUpdate-out-0.destination: update.v1.send-event
spring.cloud.stream.rabbit.bindings.sendUpdate-out-0.producer.exchange-type: fanout
consumer in service A
spring.cloud.stream.bindings.onABCUpdate-in-0.destination: update.v1.send-event
spring.cloud.stream.bindings.onABCUpdate-in-0.group: mail
spring.cloud.stream.rabbit.bindings.onABCUpdate-in-0.consumer.exchange-type: fanout
spring.cloud.stream.rabbit.bindings.onABCUpdate-in-0.consumer.dlqName: update.v1.send-event.mail.dlq
spring.cloud.stream.rabbit.bindings.onABCUpdate-in-0.consumer.auto-bind-dlq: true
spring.cloud.stream.rabbit.bindings.onABCUpdate-in-0.consumer.republishToDlq: true
#consumer in service B
spring.cloud.stream.bindings.onXYZUpdate-in-0.destination: update.v1.send-event
spring.cloud.stream.bindings.onXYZUpdate-in-0.group: sms
spring.cloud.stream.rabbit.bindings.onXYZUpdate-in-0.consumer.exchange-type: fanout
spring.cloud.stream.rabbit.bindings.onXYZUpdate-in-0.consumer.dlqName: .update.v1.send-event.sms.dlq
spring.cloud.stream.rabbit.bindings.onXYZUpdate-in-0.consumer.auto-bind-dlq: true
spring.cloud.stream.rabbit.bindings.onXYZUpdate-in-0.consumer.republishToDlq: true
`
The consumer in service A is working fine and it is the only consumer in that service. However, the consumer in B is not working and exists with two other consumers related to different functionality. To add service-B's queue to the fanout exchange I had to add the following config, which was is required in any other consumers we are having.
spring.cloud.stream.input-bindings:onXYZUpdate;
The consumer declaration is as follows:
@Bean public Consumer<TestMessage> onXYZUpdate(Strategy strategy) { return message -> { try { strategy.execute(message); } catch (Exception e) { LOG.error(e.getMessage(), e); } }; }
All the consumer declarations and the configs are similar, but an inbound queue is not getting declared for this consumer. I know that because the other two consumers in the service are logging the below log lines, but this one doesn't.
20:46:23.352 [main] [MEMBER_ID: ] [USER_ID: ] [] INFO RabbitExchangeQueueProvisioner.doProvisionConsumerDestination: [line:243] - declaring queue for inbound: <bindingName>.<group name>, bound to: <destination>
The text was updated successfully, but these errors were encountered: