perl MQSeries::Queue sync方法

来源:互联网 发布:有了源码怎么做软件 编辑:程序博客网 时间:2024/05/24 00:33
Sync    This is a flag to indicate that the Syncpoint option is to be used, and the message(s) not committed to the queue until an MQBACK, MQCOMM or MQDISC call is made. These are both wrapped with the queue manager Backout(), Commit() and Disconnect() methods respectively.    The value is simply interpreted as true or false.    If the Sync option is combined with the PutMsgOpts option, the Options field in the PutMsgOpts is checked for compatibility. If the Sync flag is true and the PutMsgOpts specifies MQseries::MQPMO_NO_SYNCPOINT, or vice versa, a fatal error is raised. If no conflict exists, the Sync flag amends the PutMsgOpts.$queue->        Get(Message => $getmessage,            Sync    => 1,           ) or die("Unable to get message\n" .                    "CompCode = " . $queue->CompCode() . "\n" .                    "Reason = " . $queue->Reason() . "\n");        print "第一条消息:===";        print $getmessage->Data();        print "\n";       # $qmgr_obj->Commit(); 这是一个标志表明 Syncpoint 选项被使用,消息不会提交到队列直到一个 MQBACK, MQCOMM or MQDISC 调用被请求。  那些都被封装为Backout(), Commit() and Disconnect() methods  这个值是简单的解释为true或者false   

0 0
原创粉丝点击