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 » WebSphere Message Broker (ACE) Support » Control when messages are taken off the Input Queue

Post new topic  Reply to topic
 Control when messages are taken off the Input Queue « View previous topic :: View next topic » 
Author Message
nickkirk
PostPosted: Tue Oct 07, 2008 8:53 am    Post subject: Control when messages are taken off the Input Queue Reply with quote

Apprentice

Joined: 26 Sep 2008
Posts: 48

Is there a way to control when messages are taken off an Input Queue?

Requirement:
- I need to be able to take one message off the Input Queue if a 'Failure' Queue is empty. Otherwise, do not take messages off the Input Queue.


Can a timer be used with the Input queue so that it polls the Input Queue at regular intervals ?
Back to top
View user's profile Send private message Send e-mail
hopsala
PostPosted: Tue Oct 07, 2008 9:24 am    Post subject: Re: Control when messages are taken off the Input Queue Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

nickkirk wrote:
Can a timer be used with the Input queue so that it polls the Input Queue at regular intervals ?

Yes. Use a TimeOutNotification node, coupled with an MQGET node for the Failure queue, and another MQGET for the Input queue. You cannot control message processing using a regular MQInput node.

So technologically speaking, this is possible. But I must say your design sounds curious at best. Are you sure such a functionality is what you need?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 07, 2008 11:20 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Reeks of "message affinity" to me. enough said
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
nickkirk
PostPosted: Tue Oct 07, 2008 12:20 pm    Post subject: Reply with quote

Apprentice

Joined: 26 Sep 2008
Posts: 48

fjb_saper, I hope all your other posts are more intelligent than this latest one !
Back to top
View user's profile Send private message Send e-mail
bower5932
PostPosted: Tue Oct 07, 2008 12:29 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

nickkirk wrote:
fjb_saper, I hope all your other posts are more intelligent than this latest one !


Do a search on "message affinity". This has been discussed numerous times with reasons given why it is not something to do.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
JosephGramig
PostPosted: Tue Oct 07, 2008 12:45 pm    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

Are you asking if you can read the message under sync point and then commit the work if you succeed?

Yes, read the programmers guide and see.
Back to top
View user's profile Send private message AIM Address
nickkirk
PostPosted: Tue Oct 07, 2008 1:11 pm    Post subject: Reply with quote

Apprentice

Joined: 26 Sep 2008
Posts: 48

hopsala, thankyou.

This will work a treat !

Unfortunately, this is the requirement.
There is data coming from a legacy application, getting processed nightly via a message flow. The incomming data (only one large message per night) is data that has 'changed' since the previous day. Therefore, this data must be processed in order so that the 'state' change can be recorded.

Cheers
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Tue Oct 07, 2008 2:42 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

nickkirk wrote:
hopsala, thankyou.

This will work a treat !

Unfortunately, this is the requirement.
There is data coming from a legacy application, getting processed nightly via a message flow. The incomming data (only one large message per night) is data that has 'changed' since the previous day. Therefore, this data must be processed in order so that the 'state' change can be recorded.

Cheers

And the way to do away with message affinity here, is instead of sending just the changed fields, send the whole object if something changed. Make sure the message/object has a timestamp. This could lead you to split your objects into more manageable parts...

On the receiving side record the timestamp of the change and discard messages with an older timestamp as no longer relevant.... byebye message affinity...
and see I was right you had message affinity in your design... and did not get back to the drawing board to try and get rid of it...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
nickkirk
PostPosted: Tue Oct 07, 2008 10:07 pm    Post subject: Reply with quote

Apprentice

Joined: 26 Sep 2008
Posts: 48

fjb_saper, not quite as easy as this.

As I said, the interfaces to the broker are legacy apps. They can NOT be modified. They are working fine.

Part of the idea for using the broker was so that the existing apps wouldn't need to be changed.


However, thanks for you ideas.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Wed Oct 08, 2008 2:18 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

nickkirk wrote:
fjb_saper, not quite as easy as this.

As I said, the interfaces to the broker are legacy apps. They can NOT be modified. They are working fine.

Part of the idea for using the broker was so that the existing apps wouldn't need to be changed.


However, thanks for you ideas.

Agreed. However most of the time "cannot be changed" is a cost benefit ratio.
And most of the "canned" legacy apps that are smart enough to generate a delta message can also generate a full message...

The tough analysis is to determine what changes often and if it warrants a separate object to be implemented in the interface... The rest is mostly processing ease and error handling vs bandwidth... as I said cost/benefit and you may end up being on the wrong side of the stick stuck with message affinity...

Message affinity is such a bad proposition because it prevents you from true load balancing between multiple processing instances (no vertical and no horizontal scaling).

The other way to alleviate it is to simply stick the messages into a DB and let some process on the DB determine whether it can continue processing or must wait for a message to be resolved (the msg may be on a DLQ along the path) ...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
dkeister
PostPosted: Wed Oct 08, 2008 5:28 am    Post subject: Reply with quote

Disciple

Joined: 25 Mar 2002
Posts: 184
Location: Purchase, New York

As I think I now understand the requirement (in middle of thread):

Unfortunately, this is the requirement.
There is data coming from a legacy application, getting processed nightly via a message flow. The incomming data (only one large message per night) is data that has 'changed' since the previous day. Therefore, this data must be processed in order so that the 'state' change can be recorded.

I had what I think is a similar situation where I needed to compare the incoming data from today with the 'last successful message' and look for changes. My solution was to take the data from the message and put it into a database. Then I issued a SQL search to find records that were new, changed, deleted and do the appropriate processing for each case. (In my case, it was to put an output message to another application for processing.)

Since this happened only once a day and the message arrived 'after hours' the database performance was not really an issue.
_________________
Dean Keister
Back to top
View user's profile Send private message Send e-mail Visit poster's website
hopsala
PostPosted: Wed Oct 08, 2008 12:02 pm    Post subject: Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

dkeister wrote:
Unfortunately, this is the requirement.
There is data coming from a legacy application, getting processed nightly via a message flow. The incomming data (only one large message per night) is data that has 'changed' since the previous day. Therefore, this data must be processed in order so that the 'state' change can be recorded.

I see. So that's why you need the failure queue checking. A strange, but interesting, design. I think you'll be better off with fjb's offer, though.

Assuming you're going to go ahead with your design, note that you should always have a TimeOutControl connected to some MQ control queue somewhere in your broker, so you can control execution time in case of failures. Otherwise, if the TimeOutNotification didn't start the flow at the expected time (broker failure, for example) you can start it without having to redeploy.
Search the forum or the lit, this is amply specified. For example http://www.mqseries.net/phpBB2/viewtopic.php?t=45310&highlight=timeoutcontrol.
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 » WebSphere Message Broker (ACE) Support » Control when messages are taken off the Input Queue
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.