Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hyung Joo Lee opened INT-4436 and commented
I'm trying to develop an application that dynamically adds flows. I found a solution which using IntegrationFlowContext to dynamically add flows, but it seems not working with Http.inboundGateway or Http.inboundChannelAdapter. Here's what I did.
IntegrationFlowContext
Http.inboundGateway
Http.inboundChannelAdapter
@RestController public class TestController { @Autowired IntegrationFlowContext context; @Autowired ConnectionFactory mqConnectionFactory; @GetMapping("/register") public String registerFlows() { context.registration(IntegrationFlows.from( Tcp.inboundGateway(Tcp.netServer(10001))) .publishSubscribeChannel(subscribers -> subscribers.subscribe(f -> f.handle(Jms.outboundAdapter(mqConnectionFactory).destination("testQueue1")))) .get()).register(); context.registration(IntegrationFlows.from( Http.inboundGateway("/hello/{country}") .requestMapping(r -> r.methods(HttpMethod.GET).params("msg")) .headerExpression("country", "#pathVariables.country") .payloadExpression("#requestParams.msg[0]")) .handle((payload, headers) -> "de".equals(headers.get("country")) ? "Hallo " + payload : "Hello " + payload) .get()).register(); return "ok"; } }
IntegrationFlowContext.registration().register() is working with Tcp.inbound... or Jms.inbound... but not Http.
IntegrationFlowContext.registration().register()
Tcp.inbound
Jms.inbound
Http
Even if it's not right changing the service contract I think it is necessary to reconfigure it at runtime.
Reference URL: https://gitter.im/spring-projects/spring-integration?at=5aaf1f1a35dd17022e74d736
Referenced from: pull request #2487
The text was updated successfully, but these errors were encountered:
Artem Bilan commented
One more request on the matter: https://stackoverflow.com/questions/49882033/dynamic-http-inbound-gateway-using-spring-integration-dsl
Sorry, something went wrong.
artembilan
No branches or pull requests
Hyung Joo Lee opened INT-4436 and commented
I'm trying to develop an application that dynamically adds flows. I found a solution which using
IntegrationFlowContext
to dynamically add flows, but it seems not working withHttp.inboundGateway
orHttp.inboundChannelAdapter
.Here's what I did.
IntegrationFlowContext.registration().register()
is working withTcp.inbound
... orJms.inbound
... but notHttp
.Even if it's not right changing the service contract I think it is necessary to reconfigure it at runtime.
Reference URL: https://gitter.im/spring-projects/spring-integration?at=5aaf1f1a35dd17022e74d736
Referenced from: pull request #2487
The text was updated successfully, but these errors were encountered: