Author |
Message
|
rajkumarpav |
Posted: Mon Mar 14, 2016 10:39 pm Post subject: Dynamically set MQOutput Transaction property |
|
|
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 |
|
 |
Gralgrathor |
Posted: Mon Mar 14, 2016 11:31 pm Post subject: |
|
|
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 |
|
 |
rajkumarpav |
Posted: Mon Mar 14, 2016 11:36 pm Post subject: |
|
|
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 |
|
 |
Gralgrathor |
Posted: Tue Mar 15, 2016 12:35 am Post subject: |
|
|
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 |
|
 |
rajkumarpav |
Posted: Tue Mar 15, 2016 12:59 am Post subject: |
|
|
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 |
|
 |
rajkumarpav |
Posted: Tue Mar 15, 2016 1:06 am Post subject: |
|
|
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 |
|
 |
Simbu |
Posted: Tue Mar 15, 2016 1:37 am Post subject: |
|
|
 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 |
|
 |
Simbu |
Posted: Tue Mar 15, 2016 1:47 am Post subject: |
|
|
 Master
Joined: 17 Jun 2011 Posts: 289 Location: Tamil Nadu, India
|
|
Back to top |
|
 |
rajkumarpav |
Posted: Tue Mar 15, 2016 2:14 am Post subject: |
|
|
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 |
|
 |
rajkumarpav |
Posted: Tue Mar 15, 2016 3:02 am Post subject: |
|
|
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 |
|
 |
rajkumarpav |
Posted: Tue Mar 15, 2016 3:27 am Post subject: |
|
|
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 |
|
 |
Gralgrathor |
Posted: Tue Mar 15, 2016 4:04 am Post subject: |
|
|
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 |
|
 |
rajkumarpav |
Posted: Tue Mar 15, 2016 4:14 am Post subject: |
|
|
Novice
Joined: 09 Mar 2016 Posts: 16
|
Sorry, I couldn't get you |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Mar 15, 2016 4:37 am Post subject: |
|
|
 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 |
|
 |
rajkumarpav |
Posted: Tue Mar 15, 2016 4:54 am Post subject: |
|
|
Novice
Joined: 09 Mar 2016 Posts: 16
|
Thank you Simbu and fjb_saper . It got worked. |
|
Back to top |
|
 |
|