Announcement Announcement Module
Collapse
No announcement yet.
message-driven-channel-adapter and number of consumers Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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

      Comment


      • #4
        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

        Comment

        Working...
        X