Results 1 to 5 of 5

Thread: About the ExecutorChannel and QueueChannel

  1. #1
    Join Date
    Feb 2010
    Posts
    7

    Default About the ExecutorChannel and QueueChannel

    Hi,

    I want to know the diff between ExecutorChannel and QueueChannel and which channel I should choose when I use Spring Integration in my project. I mean do you provide some scenarios to explain the functions of these two channels.

    Thanks a lot.

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    QueueChannel is really a wrapper over the concept of queue. QueueChanel accumulates messages and consumer can come later and retrieve/poll those messages (one at a time or in chunks)
    ExecutorChannel is the same as DirectChannel with one key difference, it delegates to TaskExecutor (might be different thread) for Message dispatch. Just like DirectChannel and unlike QueueChannel it does requires the subscriber to be present or you'll see exception with the following message: "Dispatcher has no subscribers"
    Here is more info:
    http://static.springsource.org/sprin...mplementations

  3. #3
    Join Date
    Feb 2010
    Posts
    7

    Default

    thank you for your kindly reply.

    Because the PollingConsumer uses SchedulerTaskExecutor and polling messages from QueueChannel, so I eager to know if this mechanism will impact the performance?

    I think the ExecutorChannel provide a thread pool for subscribers, is it implement reactor pattern? I want to put channels into diff jvm, if I should choose QueueChannel instend of ExecutorChannel?

  4. #4
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    SI Channels are for in-JVM communication. If you have to break JVM boundaries, you can use various remoting adapters (JMS, TCP/UDP, WS, HTTP etc...)
    With regards to the performance question, it is impossible to answer as we don't know your performance requirements, message size, throughput, hardware, etc...

  5. #5
    Join Date
    Feb 2010
    Posts
    7

    Default

    Through my testing, I found the executechannel is better than queuechannel for my scenarios, because I want to use SI to integrate some backend Web Services and use http as my transport type, when I use queue channel, I found there has some relationships about the max-message-per-poll and the queue size and the task-executor core size of the polling consumer, and they are very difficult to adjust them. But when I use executechannel, the performance is better.

    BTW, The message size will be 1k, 5k, 10k, 15k, I found big message will impact the performance of SI.

    I also use spring web service to integrate with SI and found there aslo has some performance issues when the program call WebServiceMessage.createWebServiceMessage(Inputstr eam inputstream) method, because this method will call getImplemention().createEvolope(), this method will occupy almost 50% CPU, the way I work around is using soap message string instead of SoapMessage (SWS interface)

    The Spring Integration Message is also a heavy one when it is transformed to SOAPMessage.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •