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 » Periodic publishing

Post new topic  Reply to topic
 Periodic publishing « View previous topic :: View next topic » 
Author Message
skyver
PostPosted: Sun Dec 02, 2018 11:13 pm    Post subject: Periodic publishing Reply with quote

Newbie

Joined: 02 Dec 2018
Posts: 3

Hi, I am trying to create a MQ flow (in WMB8) that publishes messages every 4 seconds. To achieve this, I am using an infinite while(true) loop, process some data, then sleep for 4 seconds. I am experiencing issues redeploying updated bar files to the execution group. Is there a problem with this implementation? Is there a more elegant design? Thanks.

Last edited by skyver on Mon Dec 03, 2018 1:58 am; edited 1 time in total
Back to top
View user's profile Send private message
abhi_thri
PostPosted: Mon Dec 03, 2018 1:21 am    Post subject: Re: Periodic publishing Reply with quote

Knight

Joined: 17 Jul 2017
Posts: 516
Location: UK

skyver wrote:
I am using an infinite while(true) loop


This is your problem...the infinite while loop which means the the flow is always engaged as the initial transaction is still running so the flow won't be able to respond to any other requests including the admin ones.

Please provide bit more context on the business case that you are trying to solve, there should be other ways to do it instead of using an infinite loop.
Back to top
View user's profile Send private message
skyver
PostPosted: Mon Dec 03, 2018 1:54 am    Post subject: Re: Periodic publishing Reply with quote

Newbie

Joined: 02 Dec 2018
Posts: 3

We have recently upgraded our input message source and it has a much higher input rate. As such, some of our legacy systems are not able to handle the huge amount of messages. So we are implementing a throttling mechanism. We have a message flow that cache all the input messages in the MQ global cache every 2 seconds. Then we have another flow that will aggregate and send out only the latest unique messages in the global cache to the legacy subscribers every 4 seconds (with fewer messages). The second flow is the one with the infinite loop. We need to send out the messages periodically without fail.
Back to top
View user's profile Send private message
abhi_thri
PostPosted: Mon Dec 03, 2018 3:32 am    Post subject: Reply with quote

Knight

Joined: 17 Jul 2017
Posts: 516
Location: UK

hi...i think are you trying to solve two different issues here - de-duplicating messages and controlling throughput rate,

de-duplicating : This should ideally be left for the applications to handle and not at the integration layer, otherwise you will end up storing application states in integration layer. The current approach is not fool proof either, what if the Source app sends the same message after the 4 secs or after an hour etc, so ideally the Source system should ensure that no duplicates are send out and also the receiving app should be designed to deal with duplicates.

Controlling throughput: There is already a feature (introduced at v9 onwards) where you can control the max message processing rate at flow level.

https://www.ibm.com/support/knowledgecenter/SSMKHH_10.0.0/com.ibm.etools.mft.doc/bj58270_.htm

So even if you may not be in a position to upgrade (ideally you should be pushing for the upgrade as v8 is already out of support i believe) whatever solution you choose it should be kept simple so that when you eventually upgrade it will be a straight forward switch to the supported feature.

Also if the legacy system is receiving the messages via MQ does it really matter if it takes a bit to consume all the messages. Some build up on the queue will not usually have any impact on the retrieval rate as such, are we talking in thousands on millions here.

As you already are using SLEEP can't you just keep it simple by getting the main flow SLEEP for a specific interval after processing a set no. of messages (you can use a shared counter to achieve it). This means the legacy system should get some time to process the first set of message before receiving the next lot.
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 » Periodic publishing
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.