It is now truly Open Source. Viva the Revolution, baby...
This module also supports an set of ``Extended Commands'', which are higher level interfaces to the contents of the administrative inforamtion in the metatopics.
This class can be used directly, but it was primary designed so that its two core functions (MQEncodePCF and MQDecodePCF) would be used as building blocks for the implementation-specific formats, such as Performance Events (MQSeries::Message::Event), Command server requests and responses (MQSeries::Command::*), and the Publish/Subscribe administrative messages (MQSeries::PubSub::AdminMessage).
Note that the parsing of XML is much more expensive than the Storable approach, and if you have a perl process on the sending and receiving end of a message flow, the author still recommends using Storable.
This requires the CPAN XML::Dumper and XML::Parser modules.
These files (MQSeries/Command/PCF/*.pl) were auto-generated on an MQSeries 5.1 host, so the macro-to-number mapping has already been done, and it is not necessary for the C macro to have been compiled into constants.c.
WARNING: The MQSC code has not been extensively tested, so use it with caution.
The Connect()
method is also new.
MQINQ()
call against
the queue manager itself. This includes both Open()
and
Close()
methods, which were not previously available.
The Open()
method is also new, although it is just a rename of
the older semi-private _mqopen()
method call.
MQINQ()
and
MQSET()
calls against queues.
This is particularly useful for creating permanent dynamic queues (which can accept persistent messages) which are purged and deleted upon close.
Now, these macros all evaluate to a string of nulls of the correct length, this you can use them precisely as documented in the MQI docs.
MQParseDeadLetter never worked, and it will be implemented (eventually) in the same way that MQSeries::Message::RulesFormat was done, with its own XS source file.
The other 3 all dealt with very specific implementations of the PCF format, and these were replaced by the MQSeries::Message::PCF class, which provides very generic PCF parsing and encoding routines (MQEncodePCF and MQDecodePCF).
Mapping the generic PCF into message format specific data is done by ``private'' class methods _TranslatePCF in each of the relevant OO modules.
This was a key prerequisite for developing MQSeries::PubSub::AdminMessage, which is also based on a PCF message format. Future implementations of special formats based on PCF should be easy. Of course, now IBM wants to move to XML for everything, so...
This used to be implemented in C, inside the XS routine, but now the hash of key/value pairs mapping a numeric ReasonCode to a readable test string is done via a pair of automatically compiled files (MQSeries/Constants/Reason*.pl)
In fact, all of the files in MQSeries/Constants are auto-generated from templates in src/pre.in, by the tool src/util/flatten_macros. This is a huge win, as it basically does the macro-to-value mapping such that the perl API is dealing with raw numbers.
There is a non-trivial startup cost otherwise, as each and every macro has to be looked up in the symbol table, the AUTOLOAD function called, a C subroutine called, etc. This saves a few seconds of startup time.
At least one site didn't support clients at all, and they didn't want to build in the support, so they can now turn it off via CONFIG.
@EXPORT
list
is built dynamically. The code for constants.c is also auto-generated, and
the code handles several different types of constant (hex, string,
character, etc).
The code also parses all of the available C header files, and makes all possible macros available. This makes maintenance of the macro list easy, but it does result in significant bloat of the namespace exported by MQSeries. So be it.
This functionality is all enabled only if one compiles with V5, of course.
MQGET()
call, when a truncated message is received, and
truncated messages are not accepted. This functionality is available in the
C++ API, the source of inspiration for the idea.
MQParseEvent MQReasonToText