Topic
  • 2 replies
  • Latest Post - ‏2018-01-30T13:39:13Z by MaxRodkin
Max_YU
Max_YU
4 Posts

Pinned topic jms queue multiple consumers

‏2017-03-31T08:54:45Z | jms queue

Hi,

We have to integrate data sent by other business applications in jms mode in a JMS queue. We have one java program that waits (in a while loop) messages with one message consumer using consumer.receive method.

The message processing can take some time (up to 20 s). In order to improve througput is it better to have

multiple java process launched in parallel to consume messages

or in the same program to use multiple consumers or messagelisteners ?

Is there a risk that 2 different process consume and process the same message or a message will be delivered to only one receiver ?

What's the best option ?

Thanks a lot

  • Mad1_IBM
    Mad1_IBM
    1 Post

    Re: jms queue multiple consumers

    ‏2017-12-21T11:07:22Z  

    yes you can. But one msg is listened by any one of them, after completion will send one acknowledgment to JMS Q.

     

     

    Regards,

    Madhusudan  

  • MaxRodkin
    MaxRodkin
    3 Posts

    Re: jms queue multiple consumers

    ‏2018-01-30T13:39:13Z  

    Hi Max!

    i have the same situation - several (up to 100) consumers in one queue. 

    The destiny consumer for answer is selecting cancerning special xml flag inside data packet.

    and have problem - answer message may readed by wrong consumer, which don`t care about special xml flag.

    How to calculate the theft? Can i see in MQ log the IP , who red the message actually?