Skip to content

Support header setting on gateways that initiate a DSL flow #3047

@garyrussell

Description

@garyrussell
@MessagingGateway(defaultHeaders = @GatewayHeader(name = "method", expression = "#gatewayMethod.name"))
interface Gate {

	void method1(String foo);

	void method2(String foo);

}

Doesn't work -

Caused by: java.lang.IllegalStateException: send is not supported, because no request channel has been configured

We need some mechanism to set headers so we can do something like...

@Bean
public IntegrationFlow flow() {
	return IntegrationFlows.from(Gate.class)
			.route(...)
			.get();
}

See https://stackoverflow.com/questions/57709118/what-is-analog-of-intgateway-xml-tag-in-java-dsl-in-spring-integration/57710401#57710401

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions