/** * Obtain a {@link MessagingTemplate} with its default destination set to the input channel * of the {@link IntegrationFlow} for provided {@code flowId}. * <p> Any {@link IntegrationFlow} bean (not only manually registered) can be used for this method. * <p> If {@link IntegrationFlow} doesn't start with the * {@link org.springframework.messaging.MessageChannel}, the * {@link IllegalStateException} is thrown. * @param flowId the bean name to obtain the input channel from * @return the {@link MessagingTemplate} instance */ @Override public MessagingTemplate messagingTemplateFor(String flowId) { return this.registry.get(flowId) .getMessagingTemplate(); }
/** * Obtain a {@link MessagingTemplate} with its default destination set to the input channel * of the {@link IntegrationFlow} for provided {@code flowId}. * <p> Any {@link IntegrationFlow} bean (not only manually registered) can be used for this method. * <p> If {@link IntegrationFlow} doesn't start with the * {@link org.springframework.messaging.MessageChannel}, the * {@link IllegalStateException} is thrown. * @param flowId the bean name to obtain the input channel from * @return the {@link MessagingTemplate} instance */ @Override public MessagingTemplate messagingTemplateFor(String flowId) { return this.registry.get(flowId) .getMessagingTemplate(); }
bean = this.beanFactory.getBean(flowRegistrationId + "." + "anId.handler", BeanFactoryHandler.class); MessagingTemplate messagingTemplate = flowRegistration.getMessagingTemplate(); messagingTemplate.setReceiveTimeout(10000);