Author |
Message
|
chaitu_bca |
Posted: Sat May 22, 2004 1:33 am Post subject: Help regarding Trigger type First. |
|
|
Novice
Joined: 05 Apr 2004 Posts: 20
|
I have a java program which is fired when the first message comes onto the application queue . The application queue has some messages with unlimited expiration time which never expire and remain in the application queue. Once the java program finishes reading all the messages once . As the messages are present on the application queue the program is getting fired again and processing all the messages. I want to call the java program only once. |
|
Back to top |
|
 |
EddieA |
Posted: Sat May 22, 2004 11:15 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Sounds like you either have your Java program set to Browse the messages, or after reading them all, it's not Committing the GETs, but Backing them out.
In either case, what MQ is doing is the documented behaviour.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat May 22, 2004 11:44 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Not only is this behavior the documented behavior, the documentation will tell you how to set a threshold that will cause the triggering to only happen when more messages than a certain number show up in the queue. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
chaitu_bca |
Posted: Mon May 24, 2004 8:20 pm Post subject: problem with trigger type first. |
|
|
Novice
Joined: 05 Apr 2004 Posts: 20
|
I am only browsing the messages on the queue and not getting them. Is there a workaround for the problem. I do not know the depth of the application queue so I cant use trig type as depth and trigger type every would call the java program a million times as the queue is expected to get many messages it is not advisable . So the only option left is Trigger type First and need to acheive the functionality. Please help me regarding this. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue May 25, 2004 3:57 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What are you really trying to do?
That is, why are you browsing the queue with a triggered program? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
chaitu_bca |
Posted: Tue May 25, 2004 4:24 am Post subject: progblem regarding trigger type first |
|
|
Novice
Joined: 05 Apr 2004 Posts: 20
|
I need to process some messages on the queue and copy them onto a different queue based upon the expiration interval field. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue May 25, 2004 4:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Based on the expiration interval?
Are you trying to make sure they get processed before they get expired? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
chaitu_bca |
Posted: Tue May 25, 2004 4:51 am Post subject: |
|
|
Novice
Joined: 05 Apr 2004 Posts: 20
|
I capture the message into a temporary object and put it onto a different queue( output queue) with extended expiration time. The problem is that as the original message is left on the application queue it triggers the process once again. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue May 25, 2004 5:12 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well, I guess I still don't exactly understand why you're trying to do this.
But I'm not going to worry about it.
What you are trying to do is a basic MQ filter pattern. You want to process each message in a queue, and put some messages in one place and other messages in a different place.
You should implement it as a real filter pattern. In other words - have all messages arrive on one queue that will be filtered. The filter program then moves each message to a different queue - picking which queue based on the appropriate criteria (in your case, expiration time).
This means that you need three queues instead of your existing two. It also allows you to actually take messages off of queues instead of browsing them and leaving them on the queue. This is more efficient and a better design. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|