Crate mqi

Source
Expand description

§Overview

Idiomatic Rust API’s to the IBM® MQ Interface (MQI) and MQ Administration Interface (MQAI).

You can use mqi to:

  • Connect to an IBM MQ server to send and receive MQ messages through the MQI functions
  • Administer IBM MQ server through the MQAI functions

This crate depends on the libmqm-sys crate for connectivity to MQ queue managers. The underlying connection uses the IBM supplied MQ libraries, offering proven stability and performance.

§Feature Flags

  • tracing — Enable tracing in the MQI calls
  • mqai — Enable the administrative API
  • exits — Enable the exits API
  • link (enabled by default) — Link the MQI library at compile time
  • dlopen2 — Enable runtime loading of the MQI library using dlopen2
  • mock — MQI and MQAI function mocking for unit and integration tests
  • mqc_9_2_0_0 (enabled by default) — Minimum MQ client version 9.2.0.0
  • mqc_9_4_3_0 — Minimum MQ client version 9.4.3.0
  • mqc_latest — Minimum MQ client version latest release
MQI functionCrate function(s)
MQCONNNot used
MQCONNXconnect, connect_as, connect_with, connect_lib, connect_lib_with
MQPUT1Connection::put_message, Connection::put_message_with
MQDISCConnection::disconnect, Connection::drop
MQOPENObject::open, Object::open_with
MQGETObject::get_data, Object::get_data_with, Object::get_string, Object::get_string_with, Object::get_as
MQPUTObject::put_message, Object::put_message_with
MQINQObject::inquire
MQSETObject::set
MQCLOSEObject::close, Object::drop, Subscription::close, Subscription::drop
MQSUBSubscription::subscribe, Subscription::subscribe_with, Subscription::subscribe_managed, Subscription::subscribe_managed_with
MQSUBRQSubscription::request_retained
MQCRTMHProperties::new
MQINQMPProperties::property, Properties::property_iter
MQSETMPProperties::set_property
MQDLTMPProperties::delete_property
MQBUFMHProperties::from_buffer, Properties::from_buffer_mut
MQMHBUFProperties::to_buffer, Properties::to_buffer_mut
MQDLTMHProperties::close, Properties::drop
MQSTATConnection::stat_put, Connection::stat_reconnection, Connection::stat_reconnection_error
MQBEGINSyncpoint::begin
MQBACKSyncpoint::backout
MQCMITSyncpoint::commit
MQCBEventCallback::register_event_handler
MQCTLNot implemented yet
MQAI functionCrate function(s)
mqCreateBagBag::new, Bag::new_lib
mqClearBagBag::clear
mqDeleteBagBag::drop
mqGetBagObject::get_bag, Object::get_bag_with
mqPutBagObject::put_bag, Object::put_bag_with
mqTruncateBagBag::truncate
mqAddInquiryBag::add_inquiry
mqDeleteItemBag::delete
mqAddIntegerBag::add with MQLONG
mqAddIntegerFilterBag::add with Filter<MQLONG>
mqAddInteger64Bag::add with MQINT64
mqAddStringBag::add with EncodedString
mqAddStringFilterBag::add with Filter<impl EncodedString>
mqAddByteStringBag::add with [MQBYTE]
mqAddByteStringFilterBag::add with Filter<&[MQBYTE]>
mqSetIntegerBag::set with MQLONG
mqSetIntegerFilterBag::set with Filter<MQLONG>
mqSetInteger64Bag::set with MQINT64
mqAddBagBag::add with Bag
mqSetStringBag::set with EncodedString
mqSetStringFilterBag::set with Filter<impl EncodedString>
mqSetByteStringBag::set with [MQBYTE]
mqSetByteStringFilterBag::set with Filter<&[MQBYTE]>
mqInquireIntegerBag::inquire with MQLONG
mqInquireIntegerFilterBag::inquire with Filter<MQLONG>
mqInquireInteger64Bag::inquire with MQINT64
mqInquireByteStringBag::inquire with Vec<MQBYTE>
mqInquireStringBag::inquire with StringCcsidOwned
mqInquireStringFilterBag::inquire with Filter<StringCcsidOwned>
mqInquireByteStringFilterBag::inquire with Filter<Vec<MQBYTE>>
mqInquireBagBag::inquire with Bag
mqCountItemsBag::count
mqExecuteConnection::execute
mqBagToBufferBag::to_buffer, Bag::buffer_len
mqBufferToBagBag::from_buffer
mqInquireItemInfoBag::inquire with (Selector, MQITEM) tuple
mqTrimNot Used
mqPadNot Used
Exits APICrate function(s)
MQXCNVCStringCcsid::try_mq_convert
MQXEPNot implemented yet
MQXCLWLNNot implemented yet
MQXDXNot implemented yet
MQZEPNot implemented yet

Modules§

attribute
bagmqai
connection
constants
executemqai
get
handle
header
open
prelude
properties
put
result
stat
string
structs
subscription
traits
types
verb

Macros§

mqstr
Define a MqStr from constant &str.

Structs§

Connection
A connection to an IBM MQ queue manager
ConnectionRef
A logical reference to a Connection
EventCallback
Manage the event handler callback of a connection
MqFunctions
A set of wrapper functions on the native IBM MQ API’s
MqStr
Fixed width string with trailing white space/nulls commonly used with IBM MQ API’s
Object
An object refers to a managed entity within IBM MQ, such as a queue, topic, channel, or queue manager
Properties
Manage message properties
Subscription
Subscription to an IBM MQ topic
Syncpoint
Manage the state of syncpoint of a connection

Traits§

Library
Holds a reference to an implementation of an MQ library
MqaiLibrarymqai

Functions§

connectlink
Create a connection to a queue manager using the compile time linked MQ library.
connect_aslink
Create a connection to a queue manager using the compile time linked MQ library and type inferred ConnectValue.
connect_lib
Create a connection to a queue manager using a Library returning a Connection.
connect_lib_as
Create a connection to a queue manager using a Library returning a usually inferred ConnectValue.
connect_lib_with
Create a connection to a queue manager using a Library returning a (Connection, impl ConnectAttr) tuple.
connect_withlink
Create a connection to a queue manager and return an implementation of ConnectAttr in tuple using the compile time linked MQ library.

Type Aliases§

MqChar