Class AccountConsumer

java.lang.Object
com.bank.payment.consumers.AccountConsumer

@Component public class AccountConsumer extends Object
Consumer for account-related events received from account microservice via RabbitMQ.

Listens to the account event queue and processes account creation and update events, converting the received DTO to a model and delegating to the AccountService.

  • Queue: ${broker.queue.accountEventQueue}
  • Exchange: ${broker.exchange.accountEventExchange} (type: FANOUT)
Since:
1.0.0
Version:
1.0.0, 06/26/2025
Author:
Fernando Cruz Cavina
  • Constructor Details

    • AccountConsumer

      public AccountConsumer()
  • Method Details

    • listenAccountEvent

      @RabbitListener(bindings=) public void listenAccountEvent(@Payload AccountEventDto accountEventDto)
      Listens for account events and saves them according to the action type.
      Parameters:
      accountEventDto - the account event data received from the queue