问题描述:

I'm new to Spring Integration. I would like to set up a very simple test setup so I can see what I'm doing. I've found many examples, and many of them have unit tests, but I want to set up some kind of very simple messaging server... and send a message to it, and have it echo the message or log it or something, so I can see that I've made it do something, I've specified an address, and it worked.

I'm not find anything out there like this. I can't even find simple test servers that just log incoming requests for any of the main messaging protocols, such as JMS or STOMP.

What is the simplest TCP messaging protocol to start with, and is there a simple test server that just logs what I'm doing and maybe echoes the messages back? It seems like that would be the starting point to using Spring Integration but I can't find anything along these lines. All I can find is Apache ActiveMQ, which is so complicated I have no idea how to set it up, or even if it can do what I'm trying to, so if I use that, and things don't work, I don't know if the problem is in my code or in the ActiveMQ configuration. Usually the best way to learn and debug is to reduce the complexity but I don't even know where to begin with that.

Thanks

网友答案:

It's not entirely clear what you want to test but the tcp-client-server sample has a simple echo server; you can add logging by adding a wire tap to the toSA channel. See the amqp sample for an example of the wire tap.

Also see the testing-examples sample for some suggested flow testing techniques. Also see chapter 18 in Spring Integration in Action. It happens to be one of the sample chapters.

相关阅读:
Top