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 » Dynamically set MQOutput Transaction property

Post new topic  Reply to topic Goto page 1, 2  Next
 Dynamically set MQOutput Transaction property « View previous topic :: View next topic » 
Author Message
rajkumarpav
PostPosted: Mon Mar 14, 2016 10:39 pm    Post subject: Dynamically set MQOutput Transaction property Reply with quote

Novice

Joined: 09 Mar 2016
Posts: 16

I am placing an error message in queue whose Transaction property is set to Automatic. Prior to this output node, there is a compute node in which I'm setting OutputRoot.Properties.Transactional = 'No'. But the message is not processed by MQOuput node if there is any exception raised other processing path. Since we are setting Transactionality as 'No' the message should processed by MQOutput node immediately. But it is not happening. Am I missing anything here?
Documentation says this:
The option that you select for the Transaction Mode property defines whether the message is written under sync point:
If you set the property to Automatic, the node participates in a transaction. If there is no inflight transaction, processed messages are committed immediately.
Back to top
View user's profile Send private message
Gralgrathor
PostPosted: Mon Mar 14, 2016 11:31 pm    Post subject: Reply with quote

Master

Joined: 23 Jul 2009
Posts: 297

Properties.Transactional is defined as a BOOLEAN. What is the actual value you're assigning to it?
_________________
A measure of wheat for a penny, and three measures of barley for a penny; and see thou hurt not the oil and the wine.
Back to top
View user's profile Send private message Send e-mail
rajkumarpav
PostPosted: Mon Mar 14, 2016 11:36 pm    Post subject: Reply with quote

Novice

Joined: 09 Mar 2016
Posts: 16

I am setting as below-
SET OutputRoot.Properties.Transactional = 'No'

In debug mode, after the compute node, it is showing as Transactional = 'false' only..
Back to top
View user's profile Send private message
Gralgrathor
PostPosted: Tue Mar 15, 2016 12:35 am    Post subject: Reply with quote

Master

Joined: 23 Jul 2009
Posts: 297

What is the value of Root.MQMD.Transactional before the MQOutput node?
_________________
A measure of wheat for a penny, and three measures of barley for a penny; and see thou hurt not the oil and the wine.
Back to top
View user's profile Send private message Send e-mail
rajkumarpav
PostPosted: Tue Mar 15, 2016 12:59 am    Post subject: Reply with quote

Novice

Joined: 09 Mar 2016
Posts: 16

I have set all the below properties as false-
OutputRoot.Properties.Transactional, OutputRoot.Properties.Persistence, OutputRoo.MQMD.Transactional,OutputRoot.MQMD.Persistence


If MQOutput node Transaction mode property is set as 'Automatic', which Transactional, Persistence values it will consider. (In Properties folder or MQMD folder) ?

If MQInput node Transaction mode property is set as True and MQOutput node Transaction mode property set as 'Automatic', how to make processed messages committed immediately ?
I have set the above properties in compute node still messages not
committed.
Back to top
View user's profile Send private message
rajkumarpav
PostPosted: Tue Mar 15, 2016 1:06 am    Post subject: Reply with quote

Novice

Joined: 09 Mar 2016
Posts: 16

If I change the MQOutput node transaction mode set as 'No' then messages committed immediately. But I don't want to set this. I want to do it dynamically since MQOutput node is defined in subflow. From the main flow, I want to make messages as non-transactional so messages would be committed immediately in subflow.
Here after passing the message(log) to subflow, in another processing path I am raising an exception using throw node.
Back to top
View user's profile Send private message
Simbu
PostPosted: Tue Mar 15, 2016 1:37 am    Post subject: Reply with quote

Master

Joined: 17 Jun 2011
Posts: 289
Location: Tamil Nadu, India

rajkumarpav wrote:
If I change the MQOutput node transaction mode set as 'No' then messages committed immediately. But I don't want to set this. I want to do it dynamically since MQOutput node is defined in subflow. From the main flow, I want to make messages as non-transactional so messages would be committed immediately in subflow.
Here after passing the message(log) to subflow, in another processing path I am raising an exception using throw node.


I don't think it is possible to set this property at runtime. You have to use two MQOutput node.
Back to top
View user's profile Send private message
Simbu
PostPosted: Tue Mar 15, 2016 1:47 am    Post subject: Reply with quote

Master

Joined: 17 Jun 2011
Posts: 289
Location: Tamil Nadu, India

Hi,
MQMD.Transactional is orphan elements adopted by the MQMD header. So I think it won't affect the way MQOutput node works.

I'm recalling my previous post.
please try to set MQ DestinationData subtree and see how it works.
https://www.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ad09630_.htm?lang=en
Back to top
View user's profile Send private message
rajkumarpav
PostPosted: Tue Mar 15, 2016 2:14 am    Post subject: Reply with quote

Novice

Joined: 09 Mar 2016
Posts: 16

Thanks Simbu for your inputs. I will check.

But, if we set MQOutput node Transaction mode as 'Automatic', the message transactionality is derived from the way that it was specified at the input node. In that case, how these values will be passed from MQInput nodeto MQOutput node? By Properties and MQMD headers only right? I think its depend on MQOutput node Destination mode property. If its set to Queue Name then it takes from Properties/MQMD..if its Destination List..then MQDestination Data or default values. Its just my assumption only. Can you please clarify?
Back to top
View user's profile Send private message
rajkumarpav
PostPosted: Tue Mar 15, 2016 3:02 am    Post subject: Reply with quote

Novice

Joined: 09 Mar 2016
Posts: 16

In the compute node previous to MQOutput node, I set it as below-
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].transactionMode = 'no';
SET OutputLocalEnvironment.Destination.MQ.DestinationData[2].persistenceMode = 'no';

Even then message is not committed immediately if the MQOuput node Transaction mode set as 'Automatic'.
Back to top
View user's profile Send private message
rajkumarpav
PostPosted: Tue Mar 15, 2016 3:27 am    Post subject: Reply with quote

Novice

Joined: 09 Mar 2016
Posts: 16

If I set only the below statement then it is working-
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].transactionMode = 'no';

But, I need to set both transactionMode and queueName properties dynamic. In that case, I coded as below-
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].transactionMode = 'no';
SET OutputLocalEnvironment.Destination.MQ.DestinationData[2].queueName = 'OUT1';

But it is not working. Can't we set two different properties at a time using DestinationData?
Back to top
View user's profile Send private message
Gralgrathor
PostPosted: Tue Mar 15, 2016 4:04 am    Post subject: Reply with quote

Master

Joined: 23 Jul 2009
Posts: 297

Have you tried:
Code:
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].transactionMode = 'no';
SET OutputLocalEnvironment.Destination.MQ.DestinationData[** 1 **].queueName = 'OUT1';


In your snippet, you were putting the queuename in a second destination element, rather than the element in which you set transaction mode.
_________________
A measure of wheat for a penny, and three measures of barley for a penny; and see thou hurt not the oil and the wine.
Back to top
View user's profile Send private message Send e-mail
rajkumarpav
PostPosted: Tue Mar 15, 2016 4:14 am    Post subject: Reply with quote

Novice

Joined: 09 Mar 2016
Posts: 16

Sorry, I couldn't get you
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 15, 2016 4:37 am    Post subject: Reply with quote

Grand High Poobah

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

rajkumarpav wrote:


But, I need to set both transactionMode and queueName properties dynamic. In that case, I coded as below-
Code:
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].transactionMode = 'no';
SET OutputLocalEnvironment.Destination.MQ.DestinationData[2].queueName = 'OUT1';


But it is not working. Can't we set two different properties at a time using DestinationData?

What he meant to say is you need to use this code
Code:
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].transactionMode = 'no';
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = 'OUT1';

Note that there is no 2nd destination implicitly declared here.
Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rajkumarpav
PostPosted: Tue Mar 15, 2016 4:54 am    Post subject: Reply with quote

Novice

Joined: 09 Mar 2016
Posts: 16

Thank you Simbu and fjb_saper . It got worked.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Dynamically set MQOutput Transaction property
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.