Author |
Message
|
subbaraommca |
Posted: Thu Jun 16, 2016 9:01 am Post subject: Java / Groovy code to wait for a message on a queue and read |
|
|
Newbie
Joined: 16 Jun 2016 Posts: 2
|
Hi Friends,
Can anybody help me with Java / Groovy code to wait for a message on a queue and read immediately in a loop continuously. Thank you in advance. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 16, 2016 9:44 am Post subject: Re: Java / Groovy code to wait for a message on a queue and |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
subbaraommca wrote: |
Can anybody help me with Java / Groovy code to wait for a message on a queue and read immediately in a loop continuously. |
There must be a hundred samples of this kind of code. Mr Google showed me pages and pages of them.
A couple of such samples are delivered with the MQ software itself. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
subbaraommca |
Posted: Thu Jun 16, 2016 12:27 pm Post subject: |
|
|
Newbie
Joined: 16 Jun 2016 Posts: 2
|
Can you please provide the appropriate link ? I have the working code to read and write message from queue once. But my requirement is to continously monitor the queue and pick the message as soon as the message enters into the queue. |
|
Back to top |
|
 |
gbaddeley |
Posted: Thu Jun 16, 2016 3:57 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
subbaraommca wrote: |
Can you please provide the appropriate link ? I have the working code to read and write message from queue once. But my requirement is to continously monitor the queue and pick the message as soon as the message enters into the queue. |
There are legions of links. Clues: "Get With Wait" "Wait Interval" _________________ Glenn |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jun 17, 2016 4:34 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Really. When we say "legions of links" we mean "a very large number, any one of which might be appropriate".
The suggestion was made to use google.
The other suggestion made was that there was a sample directly included with the product. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
gbaddeley |
Posted: Sun Jun 19, 2016 4:55 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Hi Jeff,
mqjeff wrote: |
Really. When we say "legions of links" we mean "a very large number, any one of which might be appropriate". |
Wiki Roman Legion:
The size of a typical Roman legion varied throughout the history of ancient Rome, with complements of 4,200 legionaries and 300 equites (drawn from the wealthier classes - in early Rome all troops provided their own equipment) in the republican period of Rome, (the infantry were split into 10 cohorts each of four maniples of 120 legionaries), to 5,200 men plus 120 auxiliaries in the imperial period (split into 10 cohorts, nine of 480 men each, plus the first cohort holding 800 men).
My estimate of 4500 - 5300 links was probably a bit too many.  _________________ Glenn |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jun 20, 2016 4:22 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
gbaddeley wrote: |
Hi Jeff,
mqjeff wrote: |
Really. When we say "legions of links" we mean "a very large number, any one of which might be appropriate". |
Wiki Roman Legion:
The size of a typical Roman legion varied throughout the history of ancient Rome, with complements of 4,200 legionaries and 300 equites (drawn from the wealthier classes - in early Rome all troops provided their own equipment) in the republican period of Rome, (the infantry were split into 10 cohorts each of four maniples of 120 legionaries), to 5,200 men plus 120 auxiliaries in the imperial period (split into 10 cohorts, nine of 480 men each, plus the first cohort holding 800 men).
My estimate of 4500 - 5300 links was probably a bit too many.  |
Sure. But I didn't define "a very large number"... I certainly didn't say it was larger than even one legion... I could have meant an signed 8 bit number...  _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|