Results 1 to 4 of 4

Thread: message-driven-channel-adapter and number of consumers

  1. #1

    Default message-driven-channel-adapter and number of consumers

    Hi all,

    we use a message-driven-channel-adapter for consuming messages from a JMS provider, in our case is WebLogic.

    We need to consume messages in the order they arrive on WebLogic so we thought to 'limit' the number of JMS consumers to 1, how could we achieve that with message-driven-channel-adapter ? Should we use any additional property ?

    <code>
    <jms:message-driven-channel-adapter id="jmsMessageChannelAdapter"
    connection-factory="connectionFactory"
    destination="queue"
    channel="jmsListenerChannel"
    error-channel="errorChannel"/>
    </code>

    Or the above approach, we mean limit the number of JMS consumers, is not the best one ?

    Thanks in advance for any hint.

    Greetings
    nuvola

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

    Default

    Yeah
    You can do it by using DMLC attributes that are exposed on message-driven-channel-adapter
    Code:
    <int-jms:message-driven-channel-adapter concurrent-consumers="1" max-concurrent-consumers="1" . . ./>
    Also, I know its a pretty common requirement but I still always like to ask why is the order important since in a lot of cases the processing messages in order is used as a solution to another problem which is often omitted from the actual question

  3. #3

    Default

    Hi Oleg,

    thanks for your feedback.
    You mention properly that in a lot of cases the processing messages in order is used as a solution to another problem which is often omitted from the actual question. In our scenario, there is a third party application (it is a CRM app) that publishes messages when a new business partner is entered or modified and generates also messages with data regarding addresses, relations, etc etc.
    So the app generates those messages in a given order (and messages reference each other with business partner id), so when we consume them we need to insert those into the db and to process them using stored-proc-outbound-gateway channels.
    So the order is important in our scenario.

    A further question to your feedback:

    Code:
    <int-jms:message-driven-channel-adapter concurrent-consumers="1" max-concurrent-consumers="1" . . ./>
    What is the difference between concurrent-consumers and max-concurrent-consumers ? And where could I find details about the DMLC attributes that are exposed on message-driven-channel-adapter ?

    Thanks again
    Greetings
    nuvola

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

    Default

    Sure, Spring Integration is build on top of Spring Core so our JMS, Transaction etc. support is build on that, so the best documentation is Spring Core docs http://static.springsource.org/sprin.../html/jms.html
    And then you can get more details about SI specifics here http://static.springsource.org/sprin...tmlsingle/#jms

Posting Permissions

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