1
votes

I would like to fix the following scenario:

1:N Spring Contexts (Parent/children)

  • The parent context contains a JMS inputChannel that will receive an String message.
  • Each child context contain a TCP adapter (sender and receiver) connected to a different IP:PORT

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)
1

1 Answers

1
votes

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