Message options and property values that accept a time interval using the timespec function accept the following syntax as a time specification for both MQSeries and TIBCO JMS.
‘timeout=timespec’
timespec ::= integer_number [ timespec_units ]
timespec_units ::= { dd | hh | mi | ss | ms }
is days
is hours
is minutes
is seconds
is milliseconds
is milliseconds
If you do not provide timespec_units, the default is milliseconds.
Shows the time specification for 100 days:
-- timeout specified as 100 days select msgrecv('ibm_mq:channel2/tcp/host2(5678)?' + 'qmgr=QM2,remote_qmgr=QM3,queue=QM3.Q' option 'timeout=100dd')
Shows the time specification for 300 minutes:
-- timeout specified as 300 minutes select msgrecv('ibm_mq:channel1/tcp/host1(5678)?' + 'qmgr=QM1,queue=SYSTEM.DEFAULT.LOCAL.QUEUE' option 'timeout=300mi')
Shows the time specification for 1,024 milliseconds:
-- timeout specified as 1,024 milliseconds select msgrecv( 'ibm_mq:channel2/tcp/host2(5678)?' + 'qmgr=QM2,queue=SYSTEM.DEFAULT.LOCAL.QUEUE' option 'timeout=1024ms')
MQSeries – shows the time specification for 30 seconds:
-- timeout specified as 30 seconds select msgrecv( 'ibm_mq:channel1/tcp/host1(5678)?qmgr=QM1,queue=DEFAULT.QUEUE' option 'timespec=30ss')
JMS – shows the time specification for 30 minutes:
-- timeout specified as 30 minutes select msgrecv('tibco)_jms:tcp://localhost:7222?queue=queue.sample' option 'timeout=30mi')
msgconsume, msgpublish, msgrecv, msgsend
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |