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 » Query regarding pause and resume a message processing

Post new topic  Reply to topic
 Query regarding pause and resume a message processing « View previous topic :: View next topic » 
Author Message
Harman
PostPosted: Wed Apr 22, 2020 4:19 am    Post subject: Query regarding pause and resume a message processing Reply with quote

Newbie

Joined: 22 Apr 2020
Posts: 9

Hi Experts

I am working on a project which has couple of message flows all of which are MQ input initialized . After one is completed , the other starts. I have requirement wherein I want to pause the processing of a particular message in next to current queue and resume it later. I know it is feasible to inhibit and allow the queue itself using java apis and esql , but how to do it for a particular message and not all the messages.

Regards
Harman
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 22, 2020 6:18 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

This is a bad requirement as it smacks of message affinity.

You could browse the message in question to put a lock on it and then sleep the thread until you're ready but that both grossly inefficient & offers all sorts of problems in recovery situations.

If you absolutely have to do this then I would suggest reading the message off the queue, storing it someplace (db, file, etc,) and then reading it back out when you're ready to process it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 22, 2020 6:22 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Or better still, get whoever's putting the messages to do it with all the messages in an MQ group and have the flow only read them off when the group is complete.

I have some doubts that's going to work for you with 2 flows, but would be feasible if you had one MQ enabled flow with 2 sub flows.

The path of least reengineering is probably reading all the messages off and sticking them someplace until you're ready for them.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Wed Apr 22, 2020 3:38 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

One solution is to move the 'paused' message to a separate queue, that is picked up when needed.

What is the criteria for 'resuming it later' ? Is it time based or event based? Could there be multiple messages in a paused state, with different resumption criteria for each?

MQ is built around the concept of processing everything as quickly as possible. If you need time or event based marshalling, the data should be stored in a DB, and processed when needed.
_________________
Glenn
Back to top
View user's profile Send private message
Harman
PostPosted: Sun May 17, 2020 4:29 am    Post subject: Reply with quote

Newbie

Joined: 22 Apr 2020
Posts: 9

@Vitor: Thank you for your reply. I got your point . Let me try these approaches suggested by you .
Back to top
View user's profile Send private message
Harman
PostPosted: Sun May 17, 2020 4:32 am    Post subject: Reply with quote

Newbie

Joined: 22 Apr 2020
Posts: 9

@gbaddeley : Thank you for your reply. To answer your questions, it a UI event based. So I have a button of pause and play . On Pause , it will stop the message from being processed in the consecutive queue and when play is clicked , we need to resume the message processing from that state only. Also yes there can be multiple messages in the paused state and can resume from the state where they were paused
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Sun May 17, 2020 3:03 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

Harman wrote:
@gbaddeley : Thank you for your reply. To answer your questions, it a UI event based. So I have a button of pause and play . On Pause , it will stop the message from being processed in the consecutive queue and when play is clicked , we need to resume the message processing from that state only. Also yes there can be multiple messages in the paused state and can resume from the state where they were paused


MQ is not designed to have "stateful" messages that can be updated to turn on / off a "processing flag". A possible design is to consume all the messages and store in a DB. Other messages from UI events (pause, play) could turn on and off the processing flag in the DB row, to control the processing.
_________________
Glenn
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 » Query regarding pause and resume a message processing
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.