@Test void registerGroupShouldCreateRetryExchange() throws Exception { MailboxListener listener = newListener(); EventBusTestFixture.GroupA registeredGroup = new EventBusTestFixture.GroupA(); eventBus.register(listener, registeredGroup); GroupConsumerRetry.RetryExchangeName retryExchangeName = GroupConsumerRetry.RetryExchangeName.of(registeredGroup); assertThat(rabbitMQExtension.managementAPI().listExchanges()) .anyMatch(exchange -> exchange.getName().equals(retryExchangeName.asString())); }
@Override public Mono<Registration> register(MailboxListener.ReactiveMailboxListener listener, RegistrationKey key) { Preconditions.checkState(isRunning, NOT_RUNNING_ERROR_MESSAGE); return keyRegistrationHandler.register(listener, key); }
RabbitMQEventBus implements EventBus, Startable { @Override public Mono<Registration> register(MailboxListener.ReactiveMailboxListener listener, RegistrationKey key) { Preconditions.checkState(isRunning, NOT_RUNNING_ERROR_MESSAGE); return keyRegistrationHandler.register(listener, key); } }
RabbitMQEventBus implements EventBus, Startable { @Override public Mono<Registration> register(MailboxListener.ReactiveMailboxListener listener, RegistrationKey key) { Preconditions.checkState(isRunning, NOT_RUNNING_ERROR_MESSAGE); return keyRegistrationHandler.register(listener, key); } @Inject  RabbitMQEventBus(Sender sender, ReceiverProvider receiverProvider, EventSerializer eventSerializer,
                            RetryBackoffConfiguration retryBackoff,
                            RoutingKeyConverter routingKeyConverter,
                            EventDeadLetters eventDeadLetters, MetricFactory metricFactory, ReactorRabbitMQChannelPool channelPool); }
RabbitMQEventBus implements EventBus, Startable { @Override public Mono<Registration> register(MailboxListener.ReactiveMailboxListener listener, RegistrationKey key) { Preconditions.checkState(isRunning, NOT_RUNNING_ERROR_MESSAGE); return keyRegistrationHandler.register(listener, key); } @Inject  RabbitMQEventBus(Sender sender, ReceiverProvider receiverProvider, EventSerializer eventSerializer,
                            RetryBackoffConfiguration retryBackoff,
                            RoutingKeyConverter routingKeyConverter,
                            EventDeadLetters eventDeadLetters, MetricFactory metricFactory, ReactorRabbitMQChannelPool channelPool); void start(); @PreDestroy void stop(); @Override Mono<Registration> register(MailboxListener.ReactiveMailboxListener listener, RegistrationKey key); @Override Registration register(MailboxListener.ReactiveMailboxListener listener, Group group); @Override Mono<Void> dispatch(Event event, Set<RegistrationKey> key); @Override Mono<Void> reDeliver(Group group, Event event); }
RabbitMQEventBus implements EventBus, Startable { @Override public Mono<Registration> register(MailboxListener.ReactiveMailboxListener listener, RegistrationKey key) { Preconditions.checkState(isRunning, NOT_RUNNING_ERROR_MESSAGE); return keyRegistrationHandler.register(listener, key); } @Inject  RabbitMQEventBus(Sender sender, ReceiverProvider receiverProvider, EventSerializer eventSerializer,
                            RetryBackoffConfiguration retryBackoff,
                            RoutingKeyConverter routingKeyConverter,
                            EventDeadLetters eventDeadLetters, MetricFactory metricFactory, ReactorRabbitMQChannelPool channelPool); void start(); @PreDestroy void stop(); @Override Mono<Registration> register(MailboxListener.ReactiveMailboxListener listener, RegistrationKey key); @Override Registration register(MailboxListener.ReactiveMailboxListener listener, Group group); @Override Mono<Void> dispatch(Event event, Set<RegistrationKey> key); @Override Mono<Void> reDeliver(Group group, Event event);  }