crm86
crm86

Reputation: 1394

Spring Integration communication between contexts

I would like to fix the following scenario:

1:N Spring Contexts (Parent/children)

My question is how to connect a @Gateway defined in the parent context with the correspondent child. I could use a @Router by payload even a @Filter with headers but my problem is about the @Component visibility between different contexts. How Can I configure this scenario?

At this moment, I have:

Gateway (parent) -> Transformer (parent) -> TCP sender (Child)

Upvotes: 1

Views: 130

Answers (1)

crm86
crm86

Reputation: 1394

Now it is working, including a @Transformer where input/output channels are from both contexts. In my example:

@Transformer(inputChannel="inputChannel", outputChannel="toTcpChannel")

@Transformer(inputChannel="fromTcpChannel", outputChannel="outputChannel")
  • toTcpChannel and fromTcpChannel from the child context
  • inputChannel and outputChannel from the parent context

Upvotes: 1

Related Questions