ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Help regarding Trigger type First.

Post new topic  Reply to topic
 Help regarding Trigger type First. « View previous topic :: View next topic » 
Author Message
chaitu_bca
PostPosted: Sat May 22, 2004 1:33 am    Post subject: Help regarding Trigger type First. Reply with quote

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
View user's profile Send private message
EddieA
PostPosted: Sat May 22, 2004 11:15 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Sat May 22, 2004 11:44 am    Post subject: Reply with quote

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
View user's profile Send private message
chaitu_bca
PostPosted: Mon May 24, 2004 8:20 pm    Post subject: problem with trigger type first. Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Tue May 25, 2004 3:57 am    Post subject: Reply with quote

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
View user's profile Send private message
chaitu_bca
PostPosted: Tue May 25, 2004 4:24 am    Post subject: progblem regarding trigger type first Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Tue May 25, 2004 4:42 am    Post subject: Reply with quote

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
View user's profile Send private message
chaitu_bca
PostPosted: Tue May 25, 2004 4:51 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Tue May 25, 2004 5:12 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Help regarding Trigger type First.
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.