|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQSET Updating the Trigger to ON but Qmanager not picking up |
« View previous topic :: View next topic » |
Author |
Message
|
Ramesh_ka |
Posted: Sat Dec 27, 2003 4:06 pm Post subject: MQSET Updating the Trigger to ON but Qmanager not picking up |
|
|
Novice
Joined: 24 Dec 2003 Posts: 13
|
Hi,
I have 2 QueueManager's(QM1,QM2). which reside on same host.
QM1 consists of:-
1) Remote Definition.
2) Transmission Queue ( Trigger is configured for Depth 2) and Initiation Queue is SYSTEM.CHANNEL.INITQ. and Trigger data is Sender channnel Name.
3) Sender Channel.
QM2 consists of:-
1) Local Queue.
2) Receiver channel.
I am sending Mesages using JMS API to RemoteDefinition of QM1. For the first time when there are 2 messages on Queue. Triggger is fired and all the 2 messsage are transfered to QM2's local Queue( This is fine).
Note: Qmanager after triggering it sets the Trigger to 'OFF', So
I am running a java program which set's the Trigger control attributes.
Then again passing the messages but this time for the first message after placing it on Remote definition it's directly going to QM2's local Queue.
I checked the queue attributes. they are fine. I dont know why actually the Queuemanager is forwarding the first message directly to the local Queue of QM2.
Here is the sample java program which i am using to set the Queue attributes is there any thing wrong in it.
java Program:-
import com.ibm.mq.*; // Include the WebSphere MQ classes for Java package
public class MQSample
{
private String qManager = "xxxx"; // define name of queue
// manager to connect to.
private MQQueueManager qMgr; // define a queue manager
// object
public static void main(String args[]) {
new MQSample();
}
public MQSample() {
try {
// Create a connection to the queue manager
qMgr = new MQQueueManager(qManager);
// Set up the options on the queue we wish to open...
// Note. All WebSphere MQ Options are prefixed with MQC in Java.
/* int openOptions = MQC.MQOO_INPUT_AS_Q_DEF |
MQC.MQOO_OUTPUT | MQC.MQOO_SET | MQC.MQOO_INQUIRE ; */
int openOptions = MQC.MQOO_SET | MQC.MQOO_INQUIRE ;
// Now specify the queue that we wish to open,
// and the open options...
MQQueue transmissionQueue = qMgr.accessQueue("TEST.XMITQ",openOptions);
// int i = transmissionQueue.getTriggerControl();
// int j = transmissionQueue.getTriggerDepth();
// int k = transmissionQueue.getTriggerType();
transmissionQueue.setTriggerControl(1);
transmissionQueue.setTriggerDepth(2);
transmissionQueue.setTriggerType(3);
transmissionQueue.close();
qMgr.commit();
qMgr.disconnect();
}
// If an error has occurred in the above, try to identify what went wrong
// Was it a WebSphere MQ error?
catch (MQException ex)
{
System.out.println("A WebSphere MQ error occurred : Completion code " +
ex.completionCode + " Reason code " + ex.reasonCode);
}
// Was it a Java buffer space error?
/* catch (java.io.IOException ex)
{
System.out.println("An error occurred whilst writing to the message buffer: " + ex);
} */
}
} // end of sample
If any one could flash some light on this that will be really help full to me.
thanks in advance
Regards
Ramesh |
|
Back to top |
|
 |
EddieA |
Posted: Sat Dec 27, 2003 4:57 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
How long after the trigger fires to start the channel do you put the other messages.
By default, the channel will remain active for 6000 seconds after the last transmission before going Inactive. During that time, any message arriving on the XMIT queue will be sent immediately, and the 6000 second 'countdown' is reset. When the Channel *does* go inactive, the trigger will be turned on again automatically.
Please read Chapter 14 of the Application Programmers guide to fully understand under what conditions triggering will, and will not, work. In your case, it's probably that the queue being triggered, the XMIT queue, is still Open, because the Channel is still active.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Ramesh_ka |
Posted: Mon Dec 29, 2003 10:20 am Post subject: |
|
|
Novice
Joined: 24 Dec 2003 Posts: 13
|
Hi eddie,
I changed the channel disconnect time to 6 seconds. It worked fine. But i am surprised to see one thing is that.
Earlier i used MQSET calls programtically to make the TRIGGER 'ON'. But now i am not using my program to set the Trigger 'ON' b'cause after the Trigger is fired it's still ON.
If you have any idea please let me know.
Once again thanks for your inputs on Setting channel time.
Regards
Ramesh |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|