You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+74-77Lines changed: 74 additions & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,84 +2,82 @@
2
2
3
3
This repository demonstrates how you can call IBM MQ from applications written in the Go language.
4
4
5
-
The repository originally also contained programs that exported MQ statistics to
6
-
monitoring systems. These programs have been moved to a GitHub repository called [mq-metric-samples](https://github.com/ibm-messaging/mq-metric-samples).
5
+
The repository originally also contained programs that exported MQ statistics to monitoring systems. These programs have
6
+
been moved to a GitHub repository called [mq-metric-samples](https://github.com/ibm-messaging/mq-metric-samples).
7
7
8
8
A minimum level of MQ V8 is required to build these packages, although it should be possible to connect as a client to even older versions of queue manager.
9
9
10
10
## Health Warning
11
11
12
-
This package is provided as-is with no guarantees of support or updates. You cannot use
13
-
IBM formal support channels (Cases/PMRs) for assistance with material in this repository.
12
+
This package is provided as-is with no guarantees of support or updates. You cannot use IBM formal support channels
13
+
(Cases/PMRs) for assistance with material in this repository.
14
14
15
-
There are also no guarantees of compatibility with any future versions of the package; the API
16
-
is subject to change based on any feedback. Versioned releases are made in this repository
17
-
to assist with using stable APIs. Future versions will follow semver guidance so that breaking changes
18
-
will only be done with a new major version number on the module.
15
+
There are also no guarantees of compatibility with any future versions of the package; the API is subject to change
16
+
based on any feedback. Versioned releases are made in this repository to assist with using stable APIs. Future versions
17
+
will follow semver guidance so that breaking changes will only be done with a new major version number on the module.
19
18
20
19
See the [DEPRECATIONS](DEPRECATIONS.md) file for any planned changes to the API.
21
20
22
21
## MQI Description
23
22
24
-
The `ibmmq` directory contains a Go package, exposing an MQI-like interface.
23
+
The `ibmmq` directory contains a Go package, exposing an MQI-like interface. With a few tiny exceptions noted below, the
24
+
package implements the full-function MQI. Any application you might have written using the C or COBOL MQI ought to be
25
+
easily convertible to the Go equivalent.
25
26
26
-
The intention is to give an API that is more natural for Go programmers than the
27
-
common procedural MQI. For example, fixed length string arrays from the C API such
28
-
as MQCHAR48 are represented by the native Go string type. Conversion between these
29
-
types is handled within the `ibmmq` package itself, removing the need for Go programmers
30
-
to know about it.
27
+
The intention is to give an API that is more natural for Go programmers than the common procedural MQI. For example,
28
+
fixed length string arrays from the C API such as MQCHAR48 are represented by the native Go string type. Conversion
29
+
between these types is handled within the `ibmmq` package itself, removing the need for Go programmers to know about it.
31
30
32
-
Sample programs are provided to demonstrate various features of using the MQI. See the
33
-
README in the `samples` directory for more information about those programs. Detailed information about the MQI and application design can be found in the MQ product
34
-
documentation. Although that doesn't mention Go as a language, the principles for all
35
-
applications apply.
31
+
Sample programs are provided to demonstrate various features of using the MQI. See the[README](samples/README.md) in
32
+
the `samples` directory for more information about those programs. Detailed information about the MQI and application
33
+
design can be found in the MQ product documentation. Although that doesn't mention Go as a language, the principles for
34
+
all applications apply.
36
35
37
-
The `mqmetric` directory contains functions to help monitoring programs access MQ status and statistics. This package is not needed for general application programs.
36
+
A limited trace capability is available so you can see the MQI verbs being executed. To use this, either set the
37
+
`MQIGO_TRACE` environment variable to any non-empty value or call the `ibmmq.SetTrace(true)` function.
38
+
39
+
The `mqmetric` directory contains functions to help monitoring programs access MQ status and statistics. This package is
40
+
not needed for general application programs.
38
41
39
42
## Using the package
40
43
41
-
To use code in this repository, you will need to be able to build Go applications, and
42
-
have a copy of MQ installed to build against. It uses `cgo` to access the MQI C
43
-
structures and definitions. It assumes that MQ has been installed in the default
44
-
location (on a Linux platform this would be `/opt/mqm`) but this can be changed
45
-
with environment variables if necessary.
44
+
To use code in this repository, you will need to be able to build Go applications. You must also have a copy of MQ
45
+
installed to build against. The package uses `cgo` to access the MQI C structures and definitions. It assumes that MQ has been
46
+
installed in the default location (on a Linux platform this would be `/opt/mqm`) but this can be changed with
47
+
environment variables if necessary.
46
48
47
-
Windows compatibility is also included. Current versions of the Go compiler
48
-
permit standard Windows paths (eg including spaces) so the CGO directives
49
-
can point at the normal MQ install path.
49
+
Windows compatibility is also included. Current versions of the Go compiler permit standard Windows paths (eg including
50
+
spaces) so the CGO directives can point at the normal MQ install path.
50
51
51
52
## Getting started
52
53
53
-
If you are unfamiliar with Go, the following steps can help create a working environment
54
-
with source code in a suitable tree. Initial setup tends to be platform-specific,
55
-
but subsequent steps are independent of the platform.
54
+
If you are unfamiliar with Go, the following steps can help create a working environment with source code in a suitable
55
+
tree. Initial setup tends to be platform-specific, but subsequent steps are independent of the platform.
56
56
57
57
### MQ Client SDK
58
-
The MQ Client SDK for C programs is required in order to compile and run Go programs. You may have this from an MQ Client installation image (eg rpm, dep for Linux; msi for
59
-
Windows).
58
+
The MQ Client SDK for C programs is required in order to compile and run Go programs. You may have this from an MQ
59
+
Client installation image (eg rpm, dep for Linux; msi for Windows).
60
60
61
-
For Linux x64 and Windows systems, you may also choose to use the
62
-
MQ Redistributable Client package which is a simple zip/tar file that does not need
63
-
any privileges to install:
61
+
For Linux x64 and Windows systems, you may also choose to use the MQ Redistributable Client package which is a simple
62
+
zip/tar file that does not need any privileges to install:
@@ -185,14 +180,17 @@ let me know, via an issue, if you have another project that might be suitable fo
185
180
186
181
### Package 'ibmmq'
187
182
* All regular MQI verbs are available through the `ibmmq` package.
188
-
* The only unimplemented area of MQI function is the use of Distribution Lists: they were
189
-
rarely used, and the Publish/Subscribe operations provide similar capability.
190
-
* Go is not supported for writing MQ Exits, so structures and methods for those features
191
-
are not included.
183
+
* The only unimplemented area of MQI function is the use of Distribution Lists: they were rarely used, and the
184
+
Publish/Subscribe operations provide similar capability.
185
+
* Go is not supported for writing MQ Exits, so structures and methods for those features are not included.
192
186
193
187
### Package 'mqmetric'
194
-
* The monitoring data published by the queue manager and exploited in the mqmetric package is not available before MQ V9. A limited set of metrics can be monitored for MQ V8 instances by setting the `ConnectionConfig.UsePublications` configuration option to `false`.
195
-
* There is currently a queue manager limitation which does not permit resource publications to be made about queues whose name includes '/'. Attempting to monitor such a queue will result in a warning logged by the mqmetric package.
188
+
* The monitoring data published by the queue manager and exploited in the mqmetric package is not available before MQ
189
+
V9. A limited set of metrics can be monitored for MQ V8 instances by setting the `ConnectionConfig.UsePublications`
190
+
configuration option to `false`.
191
+
* There was a queue manager limitation which did not permit resource publications to be made about queues whose name
192
+
includes '/'. This restriction was removed in MQ 9.3. Attempting to monitor such a queue on an older queue manager
193
+
results in a warning logged by the mqmetric package.
196
194
197
195
## History
198
196
@@ -203,13 +201,12 @@ See [CHANGELOG](CHANGELOG.md) in this directory.
203
201
Feedback on the utility of this package, thoughts about whether it should be changed
204
202
or extended are welcomed.
205
203
206
-
For feedback and issues relating specifically to this package, please use
207
-
the [GitHub issue tracker](https://github.com/ibm-messaging/mq-golang/issues).
204
+
For feedback and issues relating specifically to this package, please use the
0 commit comments