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 » Process message from Q and hold a copy of the message in Q

Post new topic  Reply to topic
 Process message from Q and hold a copy of the message in Q « View previous topic :: View next topic » 
Author Message
aravind703
PostPosted: Wed May 02, 2012 8:36 am    Post subject: Process message from Q and hold a copy of the message in Q Reply with quote

Apprentice

Joined: 24 Sep 2011
Posts: 29

I have a dumb question, an application (in system A) drops messages to a output queue(TEST_Q1) in system B.

Is there a way I can process the message from TEST_Q1 (in a new flow) and hold a copy of the message in TEST_Q1 . I know that MQ Input node clears the message when it passes the message to the next node.

I need to read the contents of the message but there should be a copy present in the TEST_Q1.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed May 02, 2012 9:03 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Why do you want a copy on the same queue - as it's asking for trouble?

What are you trying to achieve?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 02, 2012 9:04 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What is a transaction?
Back to top
View user's profile Send private message
aravind703
PostPosted: Wed May 02, 2012 9:15 am    Post subject: @zpat Reply with quote

Apprentice

Joined: 24 Sep 2011
Posts: 29

Hai Zpat

As soon as the application drops the message in the Queue, broker should pull some details from the message and send an email alert with the details in the body of the message. If this is to be automated, the message still needs to be in the queue for someone to review it.

I thought about shell scripting but was not sure if I can accomplish this using shell script . I am wondering if there is a way in broker.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 02, 2012 9:21 am    Post subject: Re: @zpat Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

aravind703 wrote:
As soon as the application drops the message in the Queue, broker should pull some details from the message and send an email alert with the details in the body of the message. If this is to be automated, the message still needs to be in the queue for someone to review it.


If you replace the words "the queue" with "a queue", does it not still work?

That is, if you read from Queue 1, send the email, and then write to Queue 2, is not the message still available for review?


Also, shouldn't you put the data into a database where it can be read by a web application, instead of forcing people to use queue browsers to view the data?
Back to top
View user's profile Send private message
aravind703
PostPosted: Wed May 02, 2012 9:36 am    Post subject: @ mqjeff Reply with quote

Apprentice

Joined: 24 Sep 2011
Posts: 29

Hai mqjeff

I am a great fan of yours, I had read many posts of yours in this forum and have gathered useful information from your posts. Thank you for all the effort your putting to help others like me.

Let me put you my issue here clearly

We have 3 applications,

Application 1 drops in TEST_Q1

Application 2 drops in TEST_Q2

Application 3 drops in TEST_Q3

I am writing a new flow that will read the messages from these three queues (at the input) with 1 compute node and Email output node and then I have to use 3 output queue’s after the compute node in order to save the message of those three queues separately.

This is for initial testing so I am using queue browsers to view the data for my testing.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 02, 2012 9:49 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

so you have three queue aliases, and two qlocals (one in, one out).
Back to top
View user's profile Send private message
aravind703
PostPosted: Wed May 02, 2012 10:22 am    Post subject: @mqjeff Reply with quote

Apprentice

Joined: 24 Sep 2011
Posts: 29

I don’t have any Alias queues,

all the 3 applications drop messages to their Remote queues RQ1, RQ2 and RQ3( SYSTEM -A ) , these messages are directed to the local queues TEST_Q1, TEST_Q2 & TEST_Q3 ( SYSTEM -B ) a single compute node will process the messages from these 3 local queues. An Email output node is connected to the Compute node which will send email alerts by pulling some details from the message.

Now,

Out1 of compute node Connected to TEST_Q1_NEW ,

Out2 of compute node Connected to TEST_Q2_NEW and

Out3 of compute node Connected to TEST_Q3_NEW ,


This is working currently, but was thinking if I can find a better way to do this.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 02, 2012 10:24 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You don't need three queues on the input side.

You need three qremotes, but they don't have to point to three qlocals.
You can have one qlocal.

You can also look at the Browse options on the MQInput node. It requires some additional programming effort, however, to make sure you know when to BROWSE_FIRST again.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed May 02, 2012 10:32 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Browing is a relatively advanced subject and you need to understand what a browse cursor is.

Consider how you will avoid browsing the same message more than once.

Consider what happens if the execution group, flow or broker is stopped and started again.

etc...
Back to top
View user's profile Send private message
aravind703
PostPosted: Wed May 02, 2012 10:56 am    Post subject: @mqjeff & zpat Reply with quote

Apprentice

Joined: 24 Sep 2011
Posts: 29

Thank You very much for the info. I am really interested in looking at the BROWSE options of the MQ input Node

I will be using the queue name (InputRoot.MQMD.SourceQueue) from the incoming message for this reason I was thinking to use 3 local queues(that will be the same name as that of the remote queue in System A). In the email alert I will be using the name of the queue which had a failure message. If I use one LOCAL Queue as input can I find the name of the FAILURE queue.


@ zpat i would love to give a try then take it from there
Back to top
View user's profile Send private message
aravind703
PostPosted: Wed May 02, 2012 11:46 am    Post subject: @mqjeff Reply with quote

Apprentice

Joined: 24 Sep 2011
Posts: 29

the MQ input node browse option works for me thank you very much for the information
Back to top
View user's profile Send private message
aravind703
PostPosted: Wed May 02, 2012 11:54 am    Post subject: @mqjeff Reply with quote

Apprentice

Joined: 24 Sep 2011
Posts: 29

Quote:
Hi mqjeff

I will be using the queue name (InputRoot.MQMD.SourceQueue) from the incoming message for this reason I was thinking to use 3 local queues(that will be the same name as that of the remote queue in System A). In the email alert I will be using the name of the queue which had a failure message. If I use one LOCAL Queue as input can I find the name of the FAILURE queue
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed May 02, 2012 11:57 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It's a better idea to ensure that all necessary identifying information is available in the contents of the error message, rather than relying on transport level details to provide indicators.

In general, if you have multiple qremotes pointing to the same qlocal, you won't be able to identify which qremote the sending application used.

The big problem with your setup is that it doesn't scale very well. If you have 100 applications, now you need 100 qlocals, 100 qremotes, and 100 MQInput nodes.
Back to top
View user's profile Send private message
aravind703
PostPosted: Wed May 02, 2012 12:24 pm    Post subject: @ mqjeff Reply with quote

Apprentice

Joined: 24 Sep 2011
Posts: 29

The broker code is existing, all I am doing is enhancement to the existing code in the form of email alert when somethign fails. I don’t think this existing set up is going to be changed in the near future.


For now do you have any other suggestions or directions for me so that i can research myself and improve this piece.

Assuming I have 3 different applications ( My original example )

Thank you for the valuable info
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 » Process message from Q and hold a copy of the message in Q
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.