Digital Developer Conference: a FREE half-day online conference focused on AI & Cloud – North America: Nov 2 – India: Nov 9 – Europe: Nov 14 – Asia Nov 23 Register now

Close outline
  • United States
IBM?
  • Site map
IBM?
  • Marketplace

  • Close
    Search
  • Sign in
    • Sign in
    • Register
  • IBM Navigation
IBM Developer Answers
  • Spaces
    • Blockchain
    • IBM Cloud platform
    • Internet of Things
    • Predictive Analytics
    • Watson
    • See all spaces
  • Tags
  • Users
  • Badges
  • FAQ
  • Help
Close

Name

Community

  • Learn
  • Develop
  • Connect

Discover IBM

  • ConnectMarketplace
  • Products
  • Services
  • Industries
  • Careers
  • Partners
  • Support
10.190.13.195

Refine your search by using the following advanced search options.

Criteria Usage
Questions with keyword1 or keyword2 keyword1 keyword2
Questions with a mandatory word, e.g. keyword2 keyword1 +keyword2
Questions excluding a word, e.g. keyword2 keyword1 -keyword2
Questions with keyword(s) and a specific tag keyword1 [tag1]
Questions with keyword(s) and either of two or more specific tags keyword1 [tag1] [tag2]
To search for all posts by a user or all posts with a specific tag, start typing and choose from the suggestion list. Do not use a plus or minus sign with a tag, e.g., +[tag1].
  • Ask a question

What are MQ EXPIRY messages?

1000007M77 gravatar image
Question by Gregory(Greg)Bowman  (8958) | Aug 30, 2017 at 02:14 PM mqmessagingexpiry

What are MQ EXPIRY messages and how do I implement them?

People who like this

  0
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

1 reply

  • Sort: 
1000007M77 gravatar image
Accepted answer

Answer by Gregory(Greg)Bowman (8958) | Aug 30, 2017 at 02:17 PM

Expiry messages contain a period of time, for which they are valid, set by an application that performs an MQPUT. The expiry time is a field in the message descriptor(MQMD) of a message which gets decremented as the message spends time on a queue. When a message is retrieved(MQGET) by an application, prior to expiration, the expiry time represents the amount of time left from the original time specified. When a message's expiry time has elapsed, it becomes eligible for discard by the queue manager. The message is discarded when a browse or nonbrowse MQGET occurs on the message.

A report message may be requested, when a message expires and is discarded before it is retrieved(MQGET) from a queue, if the MQPUT application specifies one of the MQRO_EXPIRATION_* report options. If none of these options is specified, no report is generated.

EXPIRY Report Options
If you want a report generated, you must specify one of the following options:

1)MQRO_EXPIRATION
    Report message.

2)MQRO_EXPIRATION_WITH_DATA
    Report message with first 100 bytes of original message included.

3)MQRO_EXPIRATION_WITH_FULL_DATA
    Report message with all of original message included.

EXPIRY message and report parameters
In the message descriptor, MQMD, you must specify the following fields:

1)Expiry
  The period of time, expressed in tenths of a second, a message is eligible to be successfully retrieved(MQGET) before it is discarded.

2)Report  
  The type of report being requested ie, MQRO_EXPIRATION. This field is optional.

3)ReplyToQ
  The name of the queue to which the report should be sent.

4)ReplyToQmgr  
  The name of the queue manager to which the report should be sent.

Portion of Sample C Code:

 /* Expiry of 5 minutes */
 md.Expiry = 3000; 
 /* Report option */ 
 md.Report = MQRO_EXPIRATION_WITH_DATA; 
 /* Reply to Queue name    */   
 memcpy(md.ReplyToQ, "EXPIRY.REPORTS                            ", MQ_Q_NAME_LENGTH);       
 /* Reply to QMGR name */                                
 memcpy(md.ReplyToQMgr, "IBMTEST                                    ", MQ_Q_MGR_NAME_LENGTH); 

Note: This information was originally in technote # 1636236

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

Follow this question

126 people are following this question.

Answers

Answers & comments

Related questions

Why are MQ expired messages discarded or disappearing from a queue without a MQGET? 2 Answers

When I install WebSphere MQ File Transfer Edition on z/OS it fails with GIM69168E. What could be causing this? 1 Answer

What are the max values for MQ tuning parameters DefaultQBufferSize and DefaultPQBufferSize? 2 Answers

Keeping message context and identity when moving from one queue to another in .NET 1 Answer

Help with Security Bulletin: IBM WebSphere MQ XR WebSockets listener is vulnerable to reflected cross-site scripting (CVE-2015-0176) 1 Answer

  • Contact
  • Privacy
  • IBM Developer Terms of use
  • Accessibility
  • Report Abuse
  • Cookie Preferences

Powered by AnswerHub

Authentication check. Please ignore.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • API Connect
  • Analytic Hybrid Cloud Core
  • Application Performance Management
  • Appsecdev
  • BPM
  • Blockchain
  • Business Transaction Intelligence
  • CAPI
  • CAPI SNAP
  • CICS
  • Cloud Analytics
  • Cloud Automation
  • Cloud Object Storage
  • Cloud marketplace
  • Collaboration
  • Content Services (ECM)
  • Continuous Testing
  • Courses
  • Customer Experience Analytics
  • DB2 LUW
  • Data and AI
  • DataPower
  • Decision Optimization
  • DevOps Build
  • DevOps Services
  • Developers IBM MX
  • Digital Commerce
  • Digital Experience
  • Finance
  • Global Entrepreneur Program
  • Hadoop
  • Hybrid Cloud Core
  • Hyper Protect
  • IBM Cloud platform
  • IBM Design
  • IBM Forms Experience Builder
  • IBM Maximo Developer
  • IBM StoredIQ
  • IBM StoredIQ-Cartridges
  • IIDR
  • ITOA
  • InformationServer
  • Integration Bus
  • Internet of Things
  • Kenexa
  • Linux on Power
  • LinuxONE
  • MDM
  • Mainframe
  • Messaging
  • Node.js
  • ODM
  • Open
  • PartnerWorld Developer Support
  • PowerAI
  • PowerVC
  • Predictive Analytics
  • Product Insights
  • PureData for Analytics
  • Push
  • QRadar App Development
  • Run Book Automation
  • Search Insights
  • Security Core
  • Storage
  • Storage Core
  • Streamsdev
  • Supply Chain Business Network
  • Supply Chain Insights
  • Swift
  • UBX Capture
  • Universal Behavior Exchange
  • UrbanCode
  • WASdev
  • WSRR
  • Watson
  • Watson Campaign Automation
  • Watson Content Hub
  • Watson Marketing Insights
  • dW Answers Help
  • dW Premium
  • developerWorks Sandbox
  • developerWorks Team
  • Watson Health
  • More
  • Tags
  • Questions
  • Users
  • Badges