Skip to content
No description, website, or topics provided.
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main
README.md
pom.xml

README.md

This project is used to reproduce the queue stuck if one of the Queue consumer is taking longer time to process any message



Follow below steps to reproduce this scenario

  1. Clone this repo
  2. Build using mvn clean install command
  3. Add following code in standalone-full.xml under <jms-destinations> tag
        <jms-queue name="queue/ATFQueue">
          <entry name="java:/queue/ATFQueue"/>
          <entry name="java:jboss/exported/queue/ATFQueue"/>
        </jms-queue>
        
  4. Deploy war in wildfly 9.0.2
  5. Hit following url
    URL Parameters
    • count : This is used to send N messages
    • queue : This is the queue name
    • sleep : Running time in seconds for consumer
    • sendToBd : If true then send message to next queue once ATF queue complete
    • name : name used in log

    http://172.26.122.51:8080/jms/rest/v1?count=1&queue=atf&sleep=100&sendToBd=false&name=3MinuteOf1Req

    Above url send 1 message to queue/ATFQueue and consumer will run for 100 second and print name as 3MinuteOf1Req in log, So this will use 1 consumer

  6. Now, browse following url
    http://172.26.122.51:8080/jms/rest/v1?count=19&queue=atf&sleep=40&sendToBd=false&name=1MinuteOf19Req

    Above url send 19 message to queue/ATFQueue and each consumer will run for 40 second and print name as 1MinuteOf19Req in log, So this will use 19 consumer,
    here overall all consumers are busy

  7. Now, browse following url
    http://172.26.122.51:8080/jms/rest/v1?count=1&queue=atf&sleep=10&sendToBd=false&name=**1MinuteOf1Req**

    Above url send 1 message to queue/ATFQueue But this will not delivered to consumer as all are busy,
    But, after completion of above 19 consumers this will still stay in queue and not delivered to any of consumer which are just free for this 1MinuteOf19Req
    here, at this point all consumers are busy
    Note : This message will only be delivered once consumer of 3MinuteOf1Req is free
You can’t perform that action at this time.