MQ_connector

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Gius
Participant
Posts: 29
Joined: Mon Mar 09, 2015 2:10 am

MQ_connector

Post by Gius »

hello,
I created a job that read from a queue with an MQ_connector.
This job run once.

But there is a way that this job stay up always, like a listen mode and when there is a message in the queue, then this job is executing ?

Thank you
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Look thru the documentation on the properties and their defaults and available values. There is a wait time property that when set to -1, means "wait indefinitely". NOT a good idea during testing and understanding the Stage. There is also a message limiter. When first starting I make these values 30 and 10 respectively. Don't make the timeout -1 until you are fully familiar with the Stage and have learned how to force it to stop cleanly (there is a message type you can specify for clean shutdown, a subject for another topic).

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Here I was thinking it would need to be a service but then I thought... heck, I'll just wait for Ernie. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

What is interesting is that Waittime defaults to -1 (wait forever)....and usually developers will accidentally leave it this way and wonder why the Job never stops. ; )

As noted above, always start your work with the MQ Connector with waittime at 30 and message quantity at (say) 10.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
JRodriguez
Premium Member
Premium Member
Posts: 425
Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:

Post by JRodriguez »

Another cool alternative is to use the trigger mechanism in the MQ manager to execute your DS job base on the arrival of the first message to the queue... this works like a charm.
Julio Rodriguez
ETL Developer by choice

"Sure we have lots of reasons for being rude - But no excuses
Post Reply