@Test public void shouldNotSendIntegrationAuditEventWhenIntegrationAuditEventsAreDisabled() { given(eventsProperties.isIntegrationAuditEventsEnabled()).willReturn(false); integrationRequestSender.sendIntegrationRequest(integrationRequest); verify(auditProducer, never()).send(ArgumentMatchers.any()); }
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void sendIntegrationRequest(IntegrationRequest event) { resolver.resolveDestination(event.getIntegrationContext().getConnectorType()).send(buildIntegrationRequestMessage(event)); sendAuditEvent(event); }
IntegrationRequestSender { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void sendIntegrationRequest(IntegrationRequest event) { resolver.resolveDestination(event.getIntegrationContext().getConnectorType()).send(buildIntegrationRequestMessage(event)); sendAuditEvent(event); } }
IntegrationRequestSender { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void sendIntegrationRequest(IntegrationRequest event) { resolver.resolveDestination(event.getIntegrationContext().getConnectorType()).send(buildIntegrationRequestMessage(event)); sendAuditEvent(event); } IntegrationRequestSender(RuntimeBundleProperties runtimeBundleProperties,
                                    MessageChannel auditProducer,
                                    BinderAwareChannelResolver resolver,
                                    RuntimeBundleInfoAppender runtimeBundleInfoAppender,
                                    IntegrationContextMessageBuilderFactory messageBuilderFactory); }
IntegrationRequestSender { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void sendIntegrationRequest(IntegrationRequest event) { resolver.resolveDestination(event.getIntegrationContext().getConnectorType()).send(buildIntegrationRequestMessage(event)); sendAuditEvent(event); } IntegrationRequestSender(RuntimeBundleProperties runtimeBundleProperties,
                                    MessageChannel auditProducer,
                                    BinderAwareChannelResolver resolver,
                                    RuntimeBundleInfoAppender runtimeBundleInfoAppender,
                                    IntegrationContextMessageBuilderFactory messageBuilderFactory); @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) void sendIntegrationRequest(IntegrationRequest event); }
IntegrationRequestSender { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void sendIntegrationRequest(IntegrationRequest event) { resolver.resolveDestination(event.getIntegrationContext().getConnectorType()).send(buildIntegrationRequestMessage(event)); sendAuditEvent(event); } IntegrationRequestSender(RuntimeBundleProperties runtimeBundleProperties,
                                    MessageChannel auditProducer,
                                    BinderAwareChannelResolver resolver,
                                    RuntimeBundleInfoAppender runtimeBundleInfoAppender,
                                    IntegrationContextMessageBuilderFactory messageBuilderFactory); @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) void sendIntegrationRequest(IntegrationRequest event); static final String CONNECTOR_TYPE; }