ibm.ibmmq
Module ibm.ibmmq
API
Declarations
ballerinax/ibm.ibmmq Ballerina library
Overview
IBM MQ is a powerful messaging middleware platform designed for facilitating reliable communication between disparate systems and applications. IBM MQ ensures the secure and orderly exchange of messages asynchronously, decoupling senders and receivers for efficient and scalable communication. It supports both point-to-point and publish/subscribe messaging models via queues and topics.
The ballerinax/ibm.ibmmq
package provides an API to connect to an IBM MQ server using Ballerina. The current connector is compatible with IBM MQ server versions up to 9.3.
Setup guide
To use the Ballerina IBM MQ connector, you need to have an IBM MQ instance running or possess an IBM MQ cloud account. For setting up IBM MQ locally, you can refer to the IBM MQ official documentation. Alternatively, to use IBM MQ on the cloud, sign up for an IBM MQ cloud account.
Create a queue
-
Log into IBM MQ console. If you are running an IBM MQ server locally you can navigate to
https://<host>:<port>/ibmmq/console
URL in your browser to access the IBM MQ console. -
Click on the
Create a queue
link. -
Select the queue type.
Create a topic
-
Go back to the home page and click on the
Manage
link on the sidebar. -
Navigate to
Events
tab. -
Click on
Create
.
Quickstart
To use the IBM MQ connector in your Ballerina application, modify the .bal
file as follows:
Step 1: Import the connector
Import ballerinax/ibm.ibmmq
module into your Ballerina project.
import ballerinax/ibm.ibmmq;
Step 2: Add IBM MQ driver
Add com.ibm.mq.allclient
as a platform dependency to the Ballerina.toml
.
[[platform.java17.dependency]] groupId = "com.ibm.mq" artifactId = "com.ibm.mq.allclient" version = "9.3.4.0"
Step 3: Instantiate a new connector
Create an ibmmq:QueueManager
instance by giving IBM MQ configuration.
configurable string queueManagerName = ?; configurable string host = ?; configurable int port = ?; configurable string channel = ?; configurable string userID = ?; configurable string password = ?; ibmmq:QueueManager queueManager = check new ( name = queueManagerName, host = host, port = port, channel = channel, userID = userID, password = password );
Create an ibmmq:Queue
or ibmmq:Topic
using the ibmmq:QueueManager
instance with relevant configurations.
configurable string queueName = ?; ibmmq:Queue queue = check queueManager.accessQueue(queueName, ibmmq:MQOO_OUTPUT | ibmmq:MQOO_INPUT_AS_Q_DEF);
Create an ibmmq:Topic
using the ibmmq:QueueManager
instance with relevant configurations.
configurable string topicName = ?; configurable string topicString = ?; ibmmq:Topic topic = check queueManager.accessTopic( topicName, topicString, ibmmq:MQOO_OUTPUT | ibmmq:MQOO_INPUT_AS_Q_DEF );
Step 4: Invoke the connector operations
Now, utilize the available connector operations.
Produce messages to an IBM MQ queue
check queue->put({ payload: "This is a sample message to IBM MQ queue".toBytes() });
Produce messages to an IBM MQ topic
check topic->put({ payload: "This is a sample message to IBM MQ topic".toBytes() });
Retrieve messages from an IBM MQ queue
ibmmq:Message? message = check queue->get();
Retrieve messages from an IBM MQ topic
ibmmq:Message? message = check topic->get();
Step 5: Run the Ballerina application
bal run
Examples
The following example shows how to use the ibm.ibmmq
connector to produce and consume messages using an IBM MQ server.
-
Produce messages - Produce messages to an IBM MQ queue.
-
Consume messages - Consume messages from an IBM MQ queue.
-
Securing IBM MQ client - Initiate secure communication between an IBM MQ client and an IBM MQ server.
-
Produce MQIIH headers - Produce IBM MQ messages to an IBM MQ queue with the MQIIH headers.
-
Consume MQIIH headers - Consume messages with the MQIIH header from an IBM MQ queue.
-
Produce MQRFH2 headers - Produce IBM MQ messages to an IBM MQ queue with the MQRFH2 headers.
-
Consume MQRFH2 headers - Consume messages with the MQRFH2 header from an IBM MQ queue.
Classes
ibm.ibmmq: QueueManager
Represents an IBM MQ queue manager.
Constructor
Initialize an IBM MQ queue manager.
ibmmq:QueueManager queueManager = check new(name = "QM1", host = "localhost", channel = "DEV.APP.SVRCONN");
init (*QueueManagerConfiguration configurations)
- configurations *QueueManagerConfiguration - The configurations to be used when initializing the IBM MQ queue manager
accessQueue
Establishes access to an IBM MQ queue on this queue manager.
ibmmq:Queue queue = check queueManager.accessQueue("queue1", ibmmq:MQOO_OUTPUT);
Parameters
- queueName string - Name of the queue
- options int - The options which control the opening of the queue
accessTopic
function accessTopic(string topicName, string topicString, OPEN_TOPIC_OPTION openTopicOption, int options) returns Topic|Error
Establishes access to an IBM MQ topic on this queue manager.
ibmmq:Topic topic = check queueManager.accessTopic( "dev", "DEV.BASE.TOPIC", ibmmq:OPEN_AS_PUBLICATION, ibmmq:MQOO_OUTPUT );
Parameters
- topicName string - The topic string to publish or subscribe against
- topicString string - The name of the topic object as defined on the local queue manager
- openTopicOption OPEN_TOPIC_OPTION - Indicates whether the topic is being opened for either publication or subscription
- options int - Options that control the opening of the topic for either publication or subscription
disconnect
function disconnect() returns Error?
Ends the connection to the IBM MQ queue manager.
Return Type
- Error? - An
ibmmq:Error
if the operation fails or else()
Clients
ibm.ibmmq: Queue
IBM MQ Queue client.
put
Puts a message to an IBM MQ queue.
check queue->put({payload: "Hello World".toBytes()});
Parameters
- message Message - IBM MQ message
- options int (default MQPMO_NO_SYNCPOINT) - Options controlling the action of the put operation. Can be a combination of
one or more
ibmmq:MQPMO_*
options and values can combined using either '+' or '|'
Return Type
- Error? - An
ibmmq:Error
if the operation fails or else()
get
function get(*GetMessageOptions getMessageOptions) returns Message|Error?
Retrieves a message from an IBM MQ queue.
ibmmq:Message? message = check queue->get();
Parameters
- getMessageOptions *GetMessageOptions - Options to control message retrieval
Return Type
close
function close() returns Error?
Closes the IBM MQ queue object. No further operations on this object are permitted after it is closed.
check queue->close();
Return Type
- Error? - An
ibmmq:Error
if the operation fails or else()
ibm.ibmmq: Topic
IBM MQ Topic client.
put
Puts a message to an IBM MQ topic.
check topic->put({payload: "Hello World".toBytes()});
Parameters
- message Message - IBM MQ message
- options int (default MQPMO_NO_SYNCPOINT) - Options controlling the action of the put operation. Can be a combination of
one or more
ibmmq:MQPMO_*
options and values can combined using either '+' or '|'
Return Type
- Error? - An
ibmmq:Error
if the operation fails or else()
get
function get(*GetMessageOptions getMessageOptions) returns Message|Error?
Retrieves a message from an IBM MQ topic.
ibmmq:Message? message = check topic->get();
Parameters
- getMessageOptions *GetMessageOptions - Options to control message retrieval
Return Type
close
function close() returns Error?
Closes the IBM MQ topic object. No further operations on this object are permitted after it is closed.
check topic->close();
Return Type
- Error? - An
ibmmq:Error
if the operation fails or else()
Constants
ibm.ibmmq: ANY
Any supported SSL/TLS cipher suite.
ibm.ibmmq: MQCCSI_APPL
Coded Character Set Identifiers - Appl.
ibm.ibmmq: MQCCSI_AS_PUBLISHED
Coded Character Set Identifiers - As Published.
ibm.ibmmq: MQCCSI_ASCII
ASCII codeset.
ibm.ibmmq: MQCCSI_ASCII_ISO
ISO standard ASCII codeset.
ibm.ibmmq: MQCCSI_DEFAULT
The CodedCharSetId of the data in the String field is defined by the CodedCharSetId field in the header structure that precedes the MQCFH structure, or by the CodedCharSetId field in the MQMD if the MQCFH is at the start of the message.
ibm.ibmmq: MQCCSI_EBCDIC
The American EBCDIC codeset.
ibm.ibmmq: MQCCSI_EMBEDDED
Coded Character Set Identifiers - Embedded.
ibm.ibmmq: MQCCSI_INHERIT
Character data in the message is in the same character set as this structure.
ibm.ibmmq: MQCCSI_Q_MGR
Character data in the message is in the queue manager's character set.
ibm.ibmmq: MQCCSI_UNDEFINED
Coded Character Set Identifiers - Undefined.
ibm.ibmmq: MQCCSI_UNICODE
Unicode codeset.
ibm.ibmmq: MQCCSI_UTF8
UTF-8 codeset.
ibm.ibmmq: MQENC_DECIMAL_NORMAL
Packed-decimal integers are represented in the conventional way: Each decimal digit in the printable form of the number is represented in packed decimal by a single hexadecimal digit in the range X'0' through X'9'.
ibm.ibmmq: MQENC_DECIMAL_REVERSED
Packed-decimal integers are represented in the same way as ENC_DECIMAL_NORMAL
, but with the bytes arranged in reverse order.
ibm.ibmmq: MQENC_FLOAT_IEEE_NORMAL
Floating-point numbers are represented using the standard IEEE3 floating-point format.
ibm.ibmmq: MQENC_FLOAT_IEEE_REVERSED
Floating-point numbers are represented in the same way as ENC_FLOAT_IEEE_NORMAL
, but with the bytes arranged in reverse order.
ibm.ibmmq: MQENC_FLOAT_S390
Floating-point numbers are represented using the standard zSeries (System/390) floating-point format.
ibm.ibmmq: MQENC_INTEGER_NORMAL
Encoding for normal integer representation (most significant byte first) or the big-endian format.
ibm.ibmmq: MQENC_INTEGER_REVERSED
Encoding for reversed integer representation (least significant byte first) or the little-endian format.
ibm.ibmmq: MQGMO_ACCEPT_TRUNCATED_MSG
If the message buffer is too small to hold the complete message, allow the MQGET call to fill the buffer with as much of the message as the buffer can hold.
ibm.ibmmq: MQGMO_BROWSE_FIRST
When a queue is opened with the MQOO_BROWSE option, a browse cursor is established, positioned logically before the first message on the queue.
ibm.ibmmq: MQGMO_BROWSE_MSG_UNDER_CURSOR
Retrieve the message pointed to by the browse cursor nondestructively, regardless of the MQMO_* options specified in the MatchOptions field in MQGMO.
ibm.ibmmq: MQGMO_BROWSE_NEXT
Advance the browse cursor to the next message on the queue that satisfies the selection criteria specified on the MQGET call.
ibm.ibmmq: MQGMO_CONVERT
Requests the application data to be converted.
ibm.ibmmq: MQGMO_FAIL_IF_QUIESCING
Force the MQGET call to fail if the queue manager is in the quiescing state.
ibm.ibmmq: MQGMO_LOCK
Lock the message that is browsed, so that the message becomes invisible to any other handle open for the queue.
ibm.ibmmq: MQGMO_MSG_UNDER_CURSOR
Retrieve the message pointed to by the browse cursor, regardless of the MQMO_* options specified in the MatchOptions field in MQGMO.
ibm.ibmmq: MQGMO_NO_SYNCPOINT
The request is to operate outside the normal unit-of-work protocols.
ibm.ibmmq: MQGMO_NO_WAIT
The application does not wait if no suitable message is available.
ibm.ibmmq: MQGMO_SYNCPOINT
The request is to operate within the normal unit-of-work protocols.
ibm.ibmmq: MQGMO_UNLOCK
Unlock a message. The message to be unlocked must have been previously locked by an MQGET call with the MQGMO_LOCK option.
ibm.ibmmq: MQGMO_WAIT
The application waits until a suitable message arrives.
ibm.ibmmq: MQOO_ALTERNATE_USER_AUTHORITY
Enables the AlternateUserId field in the ObjDesc parameter contains a user identifier to use to validate this MQOPEN call.
ibm.ibmmq: MQOO_BIND_AS_Q_DEF
The local queue manager binds the queue handle in the way defined by the DefBind queue attribute.
ibm.ibmmq: MQOO_BROWSE
Open the queue to browse messages.
ibm.ibmmq: MQOO_FAIL_IF_QUIESCING
The MQOPEN call fails if the queue manager is in quiescing state. This option is valid for all types of object.
ibm.ibmmq: MQOO_INPUT_AS_Q_DEF
Open the queue to get messages using the queue-defined default.
ibm.ibmmq: MQOO_INPUT_EXCLUSIVE
Open the queue to get messages with exclusive access.
ibm.ibmmq: MQOO_INPUT_SHARED
Open the queue to get messages with shared access.
ibm.ibmmq: MQOO_OUTPUT
Open the queue to put messages.
ibm.ibmmq: MQOO_PASS_ALL_CONTEXT
This allows the MQPMO_PASS_ALL_CONTEXT option to be specified in the PutMsgOpts parameter when a message is put on a queue.
ibm.ibmmq: MQOO_PASS_IDENTITY_CONTEXT
This allows the MQPMO_PASS_IDENTITY_CONTEXT option to be specified in the PutMsgOpts parameter when a message is put on a queue.
ibm.ibmmq: MQOO_SET_ALL_CONTEXT
This allows the MQPMO_SET_ALL_CONTEXT option to be specified in the PutMsgOpts parameter when a message is put on a queue.
ibm.ibmmq: MQOO_SET_IDENTITY_CONTEXT
This allows the MQPMO_SET_IDENTITY_CONTEXT option to be specified in the PutMsgOpts parameter when a message is put on a queue.
ibm.ibmmq: MQPMO_ALTERNATE_USER_AUTHORITY
This indicates that the AlternateUserId field in the ObjDesc parameter of the MQPUT1 call contains a user identifier that is to be used to validate authority to put messages on the queue.
ibm.ibmmq: MQPMO_ASYNC_RESPONSE
The MQPMO_ASYNC_RESPONSE option requests that an MQPUT or MQPUT1 operation is completed without the application waiting for the queue manager to complete the call.
ibm.ibmmq: MQPMO_DEFAULT_CONTEXT
The message is to have default context information associated with it, for both identity and origin.
ibm.ibmmq: MQPMO_FAIL_IF_QUIESCING
This option forces the MQPUT or MQPUT1 call to fail if the queue manager is in the quiescing state.
ibm.ibmmq: MQPMO_LOGICAL_ORDER
This option tells the queue manager how the application puts messages in groups and segments of logical messages.
ibm.ibmmq: MQPMO_NEW_CORREL_ID
The queue manager replaces the contents of the CorrelId field in MQMD with a new correlation identifier.
ibm.ibmmq: MQPMO_NEW_MSG_ID
The queue manager replaces the contents of the MsgId field in MQMD with a new message identifier.
ibm.ibmmq: MQPMO_NO_CONTEXT
Both identity and origin context are set to indicate no context.
ibm.ibmmq: MQPMO_NO_SYNCPOINT
The request is to operate outside the normal unit-of-work protocols. The message is available immediately, and it cannot be deleted by backing out a unit of work.
ibm.ibmmq: MQPMO_RESOLVE_LOCAL_Q
Use this option to fill ResolvedQName in the MQPMO structure with the name of the local queue to which the message is put, and ResolvedQMgrName with the name of the local queue manager that hosts the local queue.
ibm.ibmmq: MQPMO_SET_ALL_CONTEXT
The message is to have context information associated with it.
ibm.ibmmq: MQPMO_SET_IDENTITY_CONTEXT
The message is to have context information associated with it.
ibm.ibmmq: MQPMO_SYNCPOINT
The request is to operate within the normal unit-of-work protocols. The message is not visible outside the unit of work until the unit of work is committed. If the unit of work is backed out, the message is deleted.
ibm.ibmmq: MQSO_CREATE
Subscribe Option create
ibm.ibmmq: OPEN_AS_PUBLICATION
Open topic as a publication.
ibm.ibmmq: OPEN_AS_SUBSCRIPTION
Open topic as a subscription.
ibm.ibmmq: SSL_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
SSL cipher suite using ECDHE-ECDSA for key exchange with 3DES encryption and SHA integrity.
ibm.ibmmq: SSL_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
SSL cipher suite using ECDHE-ECDSA for key exchange with AES 128-bit encryption and SHA-256 integrity.
ibm.ibmmq: SSL_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
SSL cipher suite using ECDHE-ECDSA for key exchange with AES 128-bit GCM encryption and SHA-256 integrity.
ibm.ibmmq: SSL_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
SSL cipher suite using ECDHE-ECDSA for key exchange with AES 256-bit CBC encryption and SHA-384 integrity.
ibm.ibmmq: SSL_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
SSL cipher suite using ECDHE-ECDSA for key exchange with AES 256-bit GCM encryption and SHA-384 integrity.
ibm.ibmmq: SSL_ECDHE_ECDSA_WITH_NULL_SHA
SSL cipher suite using ECDHE-ECDSA for key exchange with NULL encryption and SHA integrity (not recommended for production use).
ibm.ibmmq: SSL_ECDHE_ECDSA_WITH_RC4_128_SHA
SSL cipher suite using ECDHE-ECDSA for key exchange with RC4 128-bit encryption and SHA integrity (not recommended for production use).
ibm.ibmmq: SSL_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
SSL cipher suite using ECDHE-RSA for key exchange with 3DES encryption and SHA integrity.
ibm.ibmmq: SSL_ECDHE_RSA_WITH_AES_128_CBC_SHA256
SSL cipher suite using ECDHE-RSA for key exchange with AES 128-bit encryption and SHA-256 integrity.
ibm.ibmmq: SSL_ECDHE_RSA_WITH_AES_128_GCM_SHA256
SSL cipher suite using ECDHE-RSA for key exchange with AES 128-bit GCM encryption and SHA-256 integrity.
ibm.ibmmq: SSL_ECDHE_RSA_WITH_AES_256_CBC_SHA384
SSL cipher suite using ECDHE-RSA for key exchange with AES 256-bit CBC encryption and SHA-384 integrity.
ibm.ibmmq: SSL_ECDHE_RSA_WITH_AES_256_GCM_SHA384
SSL cipher suite using ECDHE-RSA for key exchange with AES 256-bit GCM encryption and SHA-384 integrity.
ibm.ibmmq: SSL_ECDHE_RSA_WITH_NULL_SHA
SSL cipher suite using ECDHE-RSA for key exchange with NULL encryption and SHA integrity (not recommended for production use).
ibm.ibmmq: SSL_ECDHE_RSA_WITH_RC4_128_SHA
SSL cipher suite using ECDHE-RSA for key exchange with RC4 128-bit encryption and SHA integrity (not recommended for production use).
ibm.ibmmq: SSL_RSA_WITH_3DES_EDE_CBC_SHA
SSL cipher suite using RSA for key exchange with 3DES encryption and SHA integrity.
ibm.ibmmq: SSL_RSA_WITH_AES_128_CBC_SHA
SSL cipher suite using RSA for key exchange with AES 128-bit encryption and SHA integrity.
ibm.ibmmq: SSL_RSA_WITH_AES_128_CBC_SHA256
SSL cipher suite using RSA for key exchange with AES 128-bit encryption, SHA-256 integrity.
ibm.ibmmq: SSL_RSA_WITH_AES_128_GCM_SHA256
SSL cipher suite using RSA for key exchange with AES 128-bit GCM encryption, SHA-256 integrity.
ibm.ibmmq: SSL_RSA_WITH_AES_256_CBC_SHA
SSL cipher suite using RSA for key exchange with AES 256-bit CBC encryption and SHA integrity.
ibm.ibmmq: SSL_RSA_WITH_AES_256_CBC_SHA256
SSL cipher suite using RSA for key exchange with AES 256-bit CBC encryption, SHA-256 integrity.
ibm.ibmmq: SSL_RSA_WITH_AES_256_GCM_SHA384
SSL cipher suite using RSA for key exchange with AES 256-bit GCM encryption, SHA-384 integrity.
ibm.ibmmq: SSL_RSA_WITH_DES_CBC_SHA
SSL cipher suite using RSA for key exchange with DES encryption and SHA integrity (not recommended for production use).
ibm.ibmmq: SSL_RSA_WITH_NULL_SHA256
SSL cipher suite using RSA for key exchange with NULL encryption and SHA-256 integrity (not recommended for production use).
ibm.ibmmq: SSL_RSA_WITH_RC4_128_SHA
SSL cipher suite using RSA for key exchange with RC4 128-bit encryption and SHA integrity (not recommended for production use).
ibm.ibmmq: TLS12
TLS 1.2 protocol version.
ibm.ibmmq: TLS12ORHIGHER
TLS 1.2 or higher protocol version.
ibm.ibmmq: TLS13
TLS 1.3 protocol version.
ibm.ibmmq: TLS13ORHIGHER
TLS 1.3 or higher protocol version.
ibm.ibmmq: TLS_AES_128_CCM_8_SHA256
SSL cipher suite using AES 128-bit CCM 8 encryption, SHA-256 integrity.
ibm.ibmmq: TLS_AES_128_CCM_SHA256
SSL cipher suite using AES 128-bit CCM encryption, SHA-256 integrity.
ibm.ibmmq: TLS_AES_128_GCM_SHA256
SSL cipher suite using AES 128-bit GCM encryption, SHA-256 integrity.
ibm.ibmmq: TLS_AES_256_GCM_SHA384
SSL cipher suite using AES 256-bit GCM encryption, SHA-384 integrity.
ibm.ibmmq: TLS_CHACHA20_POLY1305_SHA256
SSL cipher suite using ChaCha20-Poly1305 encryption, SHA-256 integrity.
Records
ibm.ibmmq: CertKey
Represents a combination of certificate, private key, and private key password if encrypted.
Fields
- certFile string - A file containing the certificate
- keyFile string - A file containing the private key in PKCS8 format
- keyPassword string? - Password of the private key if it is encrypted
ibm.ibmmq: ErrorDetails
The error details type for the IBM MQ module.
Fields
- reasonCode int? - The reason code for the error
- errorCode string? - The error code for the error
- completionCode int? - The completion code for the error
ibm.ibmmq: GetMessageOptions
IBM MQ get message options.
Fields
- options int(default MQGMO_NO_WAIT) - Get message option
- waitInterval int(default 10) - The maximum time (in seconds) that a
get
call waits for a suitable message to arrive. It is used in conjunction withibmmq:MQGMO_WAIT
.
- matchOptions MatchOptions? - Message selection criteria
ibm.ibmmq: MatchOptions
Represents the selection criteria that determine which message is retrieved.
Fields
- messageId byte[]? - The message identifier of the message which needs to be retrieved
- correlationId byte[]? - The Correlation identifier of the message which needs to be retrieved
ibm.ibmmq: Message
Represents an IBM MQ message.
Fields
- format string? - Format associated with the header
- messageId byte[]? - Message identifier
- correlationId byte[]? - Correlation identifier
- expiry int? - Message lifetime
- priority int? - Message priority
- persistence int? - Message persistence
- messageType int? - Message type
- putApplicationType int? - Type of application that put the message
- replyToQueueName string? - Name of reply queue
- replyToQueueManagerName string? - Name of reply queue manager
- encoding int(default MQENC_INTEGER_NORMAL|MQENC_DECIMAL_NORMAL|MQENC_FLOAT_IEEE_NORMAL) - Specifies the representation used for numeric values in the application message data.
This can be represented using as a combination of
ibmmq:MQENC_*
options
- characterSet MessageCharset(default MQCCSI_Q_MGR) - The coded character set identifier of character data in the application message data
- accountingToken byte[]? - The accounting token, which is part of the message's identity and allows the work performed as a result of the message to be properly charged
- userId string? - Id of the user who originated the message
- headers Header[]? - Headers to be sent in the message
- payload byte[] - Message payload
ibm.ibmmq: MQCIH
Header record representing the MQCIH structure.
Fields
- flags int(default 0) - Flag of the header
- encoding int(default 0) - Numeric encoding of data that follows NameValueData
- codedCharSetId int(default 0) - Character set identifier of data that follows NameValueString
- format string(default DEFAULT_BLANK_VALUE) - MQ format name of data that follows MQCIH
- strucId string(default "CIH ") - Structure identifier
- strucLength int(default 180) - Length of the structure
- version int(default 2) - Structure version number
- returnCode int(default 0) - Return code from bridge
- compCode int(default 0) - MQ completion code or CICS EIBRESP
- reason int(default 0) - MQ reason or feedback code, or CICS EIBRESP2
- UOWControl int(default 273) - Unit-of-work control
- waitInterval int(default -2) - Wait interval for MQGET call issued by bridge task
- linkType int(default 1) - Link type
- facilityKeepTime int(default 0) - Bridge facility release time
- ADSDescriptor int(default 0) - Send/receive ADS descriptor
- conversationalTask int(default 0) - Whether task can be conversational
- taskEndStatus int(default 0) - Status at end of task
- facility byte[](default []) - Bridge facility token
- 'function string(default "") - MQ call name or CICS EIBFN function
- abendCode string(default "") - Abend code
- authenticator string(default "") - Password or passticket
- replyToFormat string(default "") - MQ format name of reply message
- remoteSysId string(default "") - Remote CICS system Id to use
- remoteTransId string(default "") - CICS RTRANSID to use
- transactionId string(default "") - Transaction to attach
- facilityLike string(default "") - Terminal emulated attributes
- attentionId string(default "") - AID key
- startCode string(default "") - Transaction start code
- cancelCode string(default "") - Abend transaction code
- nextTransactionId string(default "") - Next transaction to attach
- inputItem int(default 0) - Reserved
ibm.ibmmq: MQIIH
Header record representing the MQIIH structure.
Fields
- flags int(default 0) - Flag of the header
- encoding int(default 0) - Numeric encoding of data that follows NameValueString
- strucId string(default "IIH ") - Structure identifier
- strucLength int(default 84) - Length of the structure
- version int(default 1) - Structure version number
- codedCharSetId int(default 0) - Character set identifier of data that follows NameValueString
- format string(default DEFAULT_BLANK_VALUE) - Format name of data that follows NameValueString
- lTermOverride string(default DEFAULT_BLANK_VALUE) - The logical terminal override, placed in the IO PCB field
- mfsMapName string(default DEFAULT_BLANK_VALUE) - The message format services map name, placed in the IO PCB field
- replyToFormat string(default DEFAULT_BLANK_VALUE) - This is the MQ format name of the reply message that is sent in response to the current message
- authenticator string(default DEFAULT_BLANK_VALUE) - RACF password or passticket
- tranInstanceId byte[](default [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) - This is the transaction instance identifier
- tranState Char(default " ") - This indicates the IMS conversation state
- commitMode Char(default "0") - IMS commit mode
- securityScope Char(default "C") - This indicates the IMS security processing required
ibm.ibmmq: MQRFH
Header record representing the MQRFH structure.
Fields
- flags int(default 0) - Flag of the header
- encoding int(default 0) - Numeric encoding of data that follows NameValueString
- strucId string(default "RFH ") - Structure identifier
- strucLength int(default 32) - Length of the structure
- version int(default 1) - Structure version number
- codedCharSetId int(default 0) - Character set identifier of data that follows NameValueString
- format string(default DEFAULT_BLANK_VALUE) - Format name of data that follows NameValueString
ibm.ibmmq: MQRFH2
Header record representing the MQRFH2 structure.
Fields
- flags int(default 0) - Flag of the header
- encoding int(default 273) - Numeric encoding of data that follows NameValueData
- codedCharSetId int(default -2) - Character set identifier of data that follows NameValueData
- folderStrings string[](default []) - Contents of the variable part of the structure
- nameValueCCSID int(default 1208) - Coded character set for the NameValue data
- nameValueData byte[](default []) - NameValueData variable-length field
- nameValueLength int(default 0) - Length of NameValueData
- format string(default DEFAULT_BLANK_VALUE) - Format name of data that follows NameValueData.The name should be padded with
blanks to the length of the field.
- strucId string(default "RFH ") - Structure identifier
- strucLength int(default 36) - Length of the structure
- version int(default 2) - Structure version number
- fieldValues table<MQRFH2Field>(default table []) - Table containing all occurrences of field values matching
the specified field name in the folder
ibm.ibmmq: MQRFH2Field
Record defining a field in the MQRFH2 record.
Fields
- folderreadonly string - The name of the folder containing the field
- 'fieldreadonly string - The field name
ibm.ibmmq: Property
Represents an IBM MQ message property.
Fields
ibm.ibmmq: QueueManagerConfiguration
IBM MQ queue manager configurations.
Fields
- name string - Name of the queue manager
- host string - IBM MQ server host
- port int(default 1414) - IBM MQ server port
- channel string - IBM MQ channel
- userID string? - IBM MQ userId
- password string? - IBM MQ user password
- secureSocket SecureSocket? - Configurations related to SSL/TLS encryption
- sslCipherSuite SslCipherSuite? - Defines the combination of key exchange, encryption, and integrity algorithms used for establishing a secure SSL/TLS connection
ibm.ibmmq: SecureSocket
Configurations for secure communication with the IBM MQ server.
Fields
- cert TrustStore|string - Configurations associated with
crypto:TrustStore
or single certificate file that the client trusts
- provider string? - Name of the security provider used for SSL connections. The default value is the default security provider of the JVM
Errors
ibm.ibmmq: Error
Represents a IBM MQ distinct error.
Object types
ibm.ibmmq: Destination
IBM MQ destination client type.
put
get
function get(*GetMessageOptions getMessageOptions) returns Message|Error?
Parameters
- getMessageOptions *GetMessageOptions -
close
function close() returns Error?
Union types
ibm.ibmmq: OPEN_TOPIC_OPTION
OPEN_TOPIC_OPTION
Options which can be provided when opening an IBM MQ topic.
ibm.ibmmq: Header
Header
Header types that are provided in the IBM MQ message.
ibm.ibmmq: MessageCharset
MessageCharset
The coded character set used in application message data.
ibm.ibmmq: SslCipherSuite
SslCipherSuite
The SSL Cipher Suite to be used for secure communication with the IBM MQ server.
Import
import ballerinax/ibm.ibmmq;
Metadata
Released date: 12 days ago
Version: 1.2.0
License: Apache-2.0
Compatibility
Platform: java17
Ballerina version: 2201.9.0
Pull count
Total: 62
Current verison: 11
Weekly downloads
Keywords
ibm.ibmmq
client
messaging
network
pubsub
Contributors
Dependencies