@Test public void shouldSendIntegrationRequestMessage() { integrationRequestSender.sendIntegrationRequest(integrationRequest); verify(integrationProducer).send(integrationRequestMessageCaptor.capture()); Message<IntegrationRequest> integrationRequestMessage = integrationRequestMessageCaptor.getValue(); IntegrationRequest sentIntegrationRequestEvent = integrationRequestMessage.getPayload(); assertThat(sentIntegrationRequestEvent).isEqualTo(integrationRequest); assertThat(integrationRequestMessage.getHeaders().get(IntegrationRequestSender.CONNECTOR_TYPE)).isEqualTo(CONNECTOR_TYPE); }
@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; }