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 » reading message from MQ Queue

Post new topic  Reply to topic
 reading message from MQ Queue « View previous topic :: View next topic » 
Author Message
Ninja_gts
PostPosted: Mon May 14, 2018 9:25 am    Post subject: reading message from MQ Queue Reply with quote

Newbie

Joined: 14 May 2018
Posts: 7

Hi all,
I have a requirement to develop a subflow which will write message from a MQ Queue to database and empty the Queue on the basis of time stamp like yesterday logs will be written today with Scenario like if due to some exception, message failed to be written in database then message will rollback to the queue in order to prevent message from loosing.

Please help me to develop this flow
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon May 14, 2018 9:47 am    Post subject: Re: reading message from MQ Queue Reply with quote

Grand High Poobah

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

Ninja_gts wrote:
I have a requirement to develop a subflow which will write message from a MQ Queue to database


Why a subflow?

Ninja_gts wrote:
and empty the Queue on the basis of time stamp like yesterday logs will be written today


So use the put date and time from the message as a timestamp column in the database.

Ninja_gts wrote:
with Scenario like if due to some exception, message failed to be written in database then message will rollback to the queue in order to prevent message from loosing.


This is out of the box transactional processing for broker.

Ninja_gts wrote:
Please help me to develop this flow


What have you tried? What went wrong / didn't meet your requirements? Or do you just want us to develop it for you to save time?

The only slightly odd thing is your assertion that this has to be a subflow, which I don't see the rational for. Everything else you've described can be achieved with 2 nodes.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Ninja_gts
PostPosted: Mon May 14, 2018 6:18 pm    Post subject: Reply with quote

Newbie

Joined: 14 May 2018
Posts: 7

I have tried this by using MQ Output and Compute node but the difficulties which i am facing is that I am not able to read the message as per my requirement that is I want to read the all the message which is older than than the Current Timestamp.

I am not able handle this in compute node.

Can anyone provide me the code for a Compute node or any other way to do this.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon May 14, 2018 10:17 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Ninja_gts wrote:
I have tried this by using MQ Output and Compute node but the difficulties which i am facing is that I am not able to read the message as per my requirement that is I want to read the all the message which is older than than the Current Timestamp.

I am not able handle this in compute node.

Can anyone provide me the code for a Compute node or any other way to do this.

So explain to me why you would need to filter. Does your requirement not mean any message that's available on the queue? Explain to us how you would get a message with a date newer than the current timestamp. And please remember that all MQ Timestamps are in UTC.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue May 15, 2018 4:47 am    Post subject: Reply with quote

Grand High Poobah

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

Ninja_gts wrote:
I have tried this by using MQ Output and Compute node but the difficulties which i am facing is that I am not able to read the message as per my requirement that is I want to read the all the message which is older than than the Current Timestamp.


Well one difficulty is that you're trying to read messages with an MQOutput node.

Also, given that the current timestamp is now, how exactly would you get a message which isn't older than the current timestamp?

Ninja_gts wrote:
I am not able handle this in compute node.


Well no, the Compute node (like all of IIB) is based on a 4 dimensional model where the past is the thing that happened before now and the future is the thing which hasn't happened yet, so it's going to have trouble with the concept of looking for things that are going to happen in the future and filtering them out (not sure if that Schrodinger's Message or a new application of the Heisenberg Uncertainty Principle).

Likewise the software assumes a standard causality, where cause -> effect, so there's not much hope of you reading messages by putting them with an MQOutput node.

Ninja_gts wrote:
Can anyone provide me the code for a Compute node or any other way to do this.


You need to install the code in either a DeLorian or a 1960s London police box. I still don't think this is going to help with your causality problems.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Ninja_gts
PostPosted: Tue May 15, 2018 8:33 am    Post subject: Reply with quote

Newbie

Joined: 14 May 2018
Posts: 7

I am very sorry....
Actually it is not MQ Output Node but MQ Input node and message which I want to read is older than Current Date which I earlier mentioned as Current TimeStamp.
I am really sorry for it.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 15, 2018 9:24 am    Post subject: Reply with quote

Grand High Poobah

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

Ninja_gts wrote:
Actually it is not MQ Output Node but MQ Input node


That's going to work a lot better for you

Ninja_gts wrote:
and message which I want to read is older than Current Date which I earlier mentioned as Current TimeStamp.


Which is all of them since, as I think I laid out above, messages tend not to arrive from the future.

Ninja_gts wrote:
I am really sorry for it.


You've ended up at the place you need to be

While I, personally, would use a Compute node (because I'm ), if you're as inexperienced with IIB as you sound in this post you might get a better experience replacing the Compute node with a more modern alternative. All that helpful wizards & pictures to do the heavy lifting, and with very little loss of performance.

(There now follows a brief pause as a lot of IBM people sharpen metal objects and prepare to explain to me that there's no loss of performance. Repeatedly, very hard and in a bloody fashion......)
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » reading message from MQ Queue
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.