would love a quick explanation
<int:channel/> is simply a "connector" between the amqp inbound gateway and the service activator.
In this case, the connector is a DirectChannel, which means the service method is called directly on the thread that receives the amqp message.
You could declare it thus:
Code:
<int:channel id="pingChannel">
<queue/>
<int:channel>
which would use a QueueChannel (and you'd need a poller on the service activator to "poll" the queue for messages).
A third option is
Code:
<int:channel id="pingChannel">
<dispatcher task-executor="myTaskExecutor" />
<int:channel>
In this case the inbound adapter thread hands off the work to another thread (supplied by the task-executor).
In all three cases, this is all done entirely in memory.
Now, let's say you have an application that gets a request, sends it to a QueueChannel, and it's consumed by some service.
Code:
<int-http:inbound-adapter ...>
<int:channel id="foo">
<queue />
</int:channel>
<int:service ... />
The problem with this is you could have messages in the QueueChannel which would be lost if the server crashes.
In this case, you might decide to replace the channel with an <int-amqp:channel .../> because then, the messages will be persisted to an amqp queue, and therefore won't be lost with a server crash.
Hope that helps.