SlideShare a Scribd company logo
1 of 78
Download to read offline
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
An Introduction to, and Comparison of, the Different
MQ APIs
Matthew Whitehead
IBM MQ Development
mwhitehead@uk.ibm.com
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Agenda
• Languages, Wire Formats, and APIs
• An Overview of C MQI, JMS, and MQ Light
• Recap of the Key MQ Features
• Features supported in the different MQ APIs
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Agenda
• Languages, Wire Formats, and APIs
• An Overview of C MQI, JMS, and MQ Light
• Recap of the Key MQ Features
• Features supported in the different MQ APIs
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
APIs
Languages/
Runtimes
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
MQI
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
MQI
MQ Object
Oriented
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
MQI XMS
MQ Object
Oriented
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
MQI XMS
MQ Object
Oriented
WCF
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
MQI XMS
MQ Object
Oriented
WCF JMS
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
MQI XMS
MQ Object
Oriented
WCF JMS MQTT
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
MQI XMS
MQ Object
Oriented
WCF JMS MQ HTTPMQTT
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
MQI XMS
MQ Object
Oriented
WCF JMS MQTT MQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
MQI XMS WCF JMS MQTT
MQ Object
Oriented
MQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
MQI XMS WCF JMS MQTT
MQ Object
Oriented
MQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
MQI XMS WCF JMS MQTT
MQ Object
Oriented
MQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
Perl
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
Perl
C
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
Perl
C
ActiveX
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
Perl
C
ActiveX
WCF
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
Perl
C
ActiveX
WCF
Java
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
Perl
C
ActiveX
WCF
Java
.Net
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
Perl
C
ActiveX
WCF
Java
.Net
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ Light
C#
MQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
Perl
C
ActiveX
WCF
Java
.Net Ruby
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ Light
C#
MQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
Perl
C
ActiveX
WCF
Java
.Net
nodejs
Ruby
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ Light
C#
MQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
Perl
C
ActiveX
WCF
Java
.Net
nodejs
Ruby
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ Light
C#
MQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB Perl
C
ActiveX
WCF
Java
.Net
nodejs
Ruby
C++
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ Light
C#
Native C++ is now
stabilised.
Recommendations
are XMS or the C MQI
MQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
Perl
C
ActiveX
WCF
Java
.Net
nodejs
Ruby
Base Java is now
stabilised. JMS the
recommended MQ-
Java interface
C#
MQI XMS
MQ Object
Oriented
(Base Java)
WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
Perl
C
ActiveX
WCF
Java
.Net
nodejs
Ruby
C#
MQI XMS
MQ Object
Oriented
(Base Java)
WCF JMS HTTPMQTT MQ LightHTTP MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
MQ Wire Format
(& Local Bindings)
APIs
Languages/
Runtimes
MQTT HTTP AMQP 1.0
Cobol
PL/1
VB
C++
Perl
C
ActiveX
WCF
Java
.Net
nodejs
Ruby
C#
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ LightHTTP MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Languages, Wire Formats, and APIs
QM
Wire Formats
C
Cobol
Java
WCF
PL/1
VB .Net
C++
Perl ActiveX
MQ Wire Format
(& Local Bindings)
AMQP 1.0MQTT
nodejs
Ruby
HTTP
APIs
Languages/
Runtimes
C#
MQI XMS
MQ Object
Oriented
WCF JMS HTTPMQTT MQ LightHTTP MQ LightMQ HTTP MQ Light
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Agenda
• Languages, Wire Formats, and APIs
• An Overview of C MQI, JMS, and MQ Light
• Recap of the Key MQ Features
• Features supported in the different MQ APIs
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
C MQI Overview 1/4
Structures
MQMD – Message descriptor MQCNO – Connect options
MQOD – Object descriptor MQGMO – Get message options
MQSD – Subscription descriptor MQPMO – Put message options
MQPD – Property descriptor MQCSP – Security parameters
MQCD – Client channel descriptor
Verbs
MQCONN – Connect to QM MQOPEN – Open queue/topic
MQCONNX – Connect with opts MQCLOSE – Close queue/topic
MQDISC – Disconnect from QM
MQPUT - Put/publish a msg MQBEGIN – Start global transaction
MQPUT1 – Open/put/close MQCMIT – Commit transaction
MQGET – Get message MQBACK – Rollback transaction
MQSUB – Subscribe to topic MQINQ – Inquire about object
MQCTL – Control callbacks MQSET – Set object attribute
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
C MQI Overview 1/4
Constants - Completion codes
MQCC_OK – Verb completed OK
MQCC_WARNING – Verb completed but with warnings (see MQRC)
MQCC_FAILED – Verb failed
Constants - Return codes (there are many of these), e.g:
MQRC_NONE – Nothing to check
MQRC_Q_MGR_QUIESCING – Can’t do the action – QM is stopping
MQRC_NOT_AUTHORIZED – Can’t do the action – you’re not authorzed
MQRC_TRUNCATED_MSG_ACCEPTED – The message is too big for the buffer
MQRC_MSG_TOO_BIG_FOR_Q – Guess what this means…
Constants - Misc (there are loads of these), e.g:
MQIA_CURRENT_Q_DEPTH, MQCACH_CHANNEL_NAME,
MQCA_CLUSTER_NAME, …
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
C MQI Overview 1/4
MQOD od = {MQOD_DEFAULT}; /* Object Descriptor */
MQMD md = {MQMD_DEFAULT}; /* Message Descriptor */
MQPMO pmo = {MQPMO_DEFAULT}; /* put message options */
MQCNO cno = {MQCNO_DEFAULT}; /* connection options */
MQCSP csp = {MQCSP_DEFAULT}; /* security parameters */
MQHCONN Hcon; /* connection handle */
MQHOBJ Hobj; /* object handle */
MQLONG O_options; /* MQOPEN options */
MQLONG C_options; /* MQCLOSE options */
MQLONG CompCode; /* completion code */
MQLONG OpenCode; /* MQOPEN completion code */
MQLONG Reason; /* reason code */
MQLONG CReason; /* reason code for MQCONNX */
MQLONG messlen; /* message length */
char buffer[65535]; /* message buffer */
char QMName[50]; /* queue manager name */
char *UserId; /* UserId for authentication */
char Password[MQ_CSP_PASSWORD_LENGTH + 1] = {0}; /* For auth */
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
2/4
MQCONNX(QMName, /* queue manager */
&cno, /* connection options */
&Hcon, /* connection handle */
&CompCode, /* completion code */
&CReason); /* reason code */
if (CompCode == MQCC_FAILED)
{
// Something went wrong – print out the error and quit
}
if (CompCode == MQCC_WARNING)
{
// Handle the warning, decide whether to continue
}
C MQI Overview
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
3/4
O_options = MQOO_OUTPUT /* open queue for output */
| MQOO_FAIL_IF_QUIESCING; /* but not if MQM stopping */
MQOPEN(Hcon, /* connection handle */
&od, /* object descriptor for queue */
O_options, /* open options */
&Hobj, /* object handle */
&OpenCode, /* MQOPEN completion code */
&Reason); /* reason code */
if (OpenCode == MQCC_FAILED)
{
// Something went wrong – print the error and quit
}
if (Reason != MQRC_NONE)
{
// Something went wrong – print the error and quit
}
C MQI Overview
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
4/4
if (fgets(buffer, sizeof(buffer), stdin) != NULL) /* read a message from keyboard input */
{
messlen = (MQLONG)strlen(buffer); /* get the length of the message */
if (buffer[messlen-1] == 'n') /* remove the last newline character */
{
buffer[messlen-1] = '0';
--messlen;
}
memcpy(md.MsgId, MQMI_NONE, sizeof(md.MsgId) );
MQPUT(Hcon, /* connection handle */
Hobj, /* object handle */
&md, /* message descriptor */
&pmo, /* default options (datagram) */
messlen, /* message length */
buffer, /* message buffer */
&CompCode, /* completion code */
&Reason); /* reason code */
if (Reason != MQRC_NONE)
{
// Print out reason code and quit
}
}
C MQI Overview
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
JMS Overview 1/4
Objects
ConnectionFactory – from which connections are created
Connection – from which sessions are created
Session – from which producers, consumers, and destinations are created
Destination – to which messages are sent (Queue and Topic sub-types)
MessageProducer – with which messages are sent
MessageConsumer – with which messages are received
QueueBrowser – with which messages are browsed from a queue
TextMessage/BytesMessage/ObjectMessage/MapMessage/StreamMessage
JMSContext – JMS 2 – combination of connection and session
JMSProducer and JMSConsumer – JMS 2
Key Actions
connection.start(…) <- (not required in JMS 2)
session.createProducer(..) session.createConsumer(…)
producer.send(…) consumer.receiveWithWait(…)
message.acknowledge()
connection.close()
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
1/3
Connection connection = null;
Session session = null;
Destination destination = null;
MessageProducer producer = null;
try {
// Create a connection factory
JmsFactoryFactory ff =
JmsFactoryFactory.getInstance(WMQConstants.WMQ_PROVIDER);
JmsConnectionFactory cf = ff.createConnectionFactory();
// Set up connection properties
cf.setStringProperty(WMQConstants.WMQ_HOST_NAME, host);
cf.setIntProperty(WMQConstants.WMQ_PORT, port);
cf.setStringProperty(WMQConstants.WMQ_CHANNEL, channel);
cf.setStringProperty(WMQConstants.WMQ_QUEUE_MANAGER, queueManagerName);
cf.setStringProperty(WMQConstants.USERID, user);
cf.setStringProperty(WMQConstants.PASSWORD, password);
cf.setBooleanProperty(WMQConstants.USER_AUTHENTICATION_MQCSP, true);
} catch (JMSException e) { // Handle exceptions here
}
JMS Overview
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
2/3
// Create JMS objects
connection = cf.createConnection(); // MQCONN is made under the covers
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
if (isTopic) {
destination = session.createTopic(destinationName);
}
else {
destination = session.createQueue(destinationName);
}
// MQOPEN is performed under the covers
producer = session.createProducer(destination);
JMS Overview
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
3/3
try {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
do {
System.out.print("Enter some text to be sent <ENTER to finish>:");
System.out.flush();
String line = in.readLine();
if (line != null && line.trim().length() != 0) {
TextMessage message = session.createTextMessage(line);
producer.send(message); // MQPUT happens under the covers
System.out.println("Sent message:n" + message);
}
} while (line != null);
} catch (Exception JMSException | IOException e) {
// Handle exceptions here
}
JMS Overview
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
MQ Light Overview (nodejs client) 1/4
Library Import
var mqlight = require(‘mqlight’);
Client instantiation
var opts = {service: “amqp://localhost”, id: “matt” };
var client = mqlight.createClient(opts);
Client-connected callback
client.on(‘started’, function() {<code to run when the client has
connected>});
Client-error callback
client.on(‘error’, function() {<code to run when the client has an
error>});
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
MQ Light Overview (nodejs client) 1/4
Message-received callback
client.on(‘message’, function(data, delivery) {<code to run when a
message is received>});
Malformed-message-received callback
client.on(‘malformed’, function(data, delivery) {<code to run when
a malformed message is received>});
Client subscribe, plus client-subscribed callback
client.subscribe(pattern, share, options, function(err, pattern)
{<code to run when the subscribe returns>});
Send message, plus message-sent or message-not-sent callback
var buffered = !client.send(topic, body, options, callback);
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
1/2
var mqlight = require('mqlight'); // Import the MQ Light client module
var nopt = require('nopt');
var uuid = require('node-uuid');
var fs = require('fs');
var opts = { // Define configuration options
service: “amqp://localhost:5672”,
id: “client-01”
};
var client = mqlight.createClient(opts); // Create the connection
MQ Light Overview
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
2/2
// Once we have connected we can start sending messages
client.on('started', function() {
var sendNextMessage = function() { setImmediate(sendMessage); } };
var sendMessage = function() {
var options = { qos: mqlight.QOS_AT_LEAST_ONCE };
var callback = function(err, topic, data, options) {
if (err) {
// The send failed – print the error and quit
} else {
// Nothing to do – send took place successfully
}
}
client.send(topic, body, options, callback);
}
}
MQ Light Overview
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Agenda
• A refresher on C, JMS, and MQ Light
• An Overview of C MQI, JMS, and MQ Light
• Recap of the Key MQ Features
• Features supported in the different MQ APIs
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
 Point-to-Point messaging
 Publish/Subscribe messaging
 Shared Subscriptions
 Message persistence
 Message expiry
 Message grouping
 Message segmentation
 Message selection
 Local transactions
 XA/Global transactions
 At least once/at most once/exactly once delivery
 HA failover
MQ features
 Message properties
 Asynchronous Consume
 Message browsing
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Point-to-Point Messaging
MQ Wire Format MQTT HTTP AMQP 1.0
 ~
MQI MQ OO MQTT MQ HTTP MQ Light
   ~
Examples
C/MQI
strncpy(od.ObjectName, “Q1”, (size_t)MQ_Q_NAME_LENGTH);
MQOPEN(Hcon, &od, O_options,&Hobj, &OpenCode, &Reason);
JMS
destination = session.createQueue(“Q1”);
producer = session.createProducer(destination);
nodejs/
MQ Light
Notes:
• ~ can be set indirectly
client.send(“Q1”, body, options, callback);
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Publish/Subscribe Messaging
MQ Wire Format MQTT HTTP AMQP 1.0
  ~
MQI MQ OO MQTT MQ HTTP MQ Light
    
Examples
C/MQI
od.ObjectString.VSPtr=“my/first/messaging/topic”;
od.ObjectString.VSLength=(MQLONG)strlen(argv[1]);
od.ObjectType = MQOT_TOPIC;
MQOPEN(Hcon, &od, O_options,&Hobj, &OpenCode, &Reason);
JMS
destination = session.createTopic(“my/first/topic”);
producer = session.createProducer(destination);
nodejs/
MQ Light
client.send(“my/first/messaging/topic”, body, options,
callback);
Notes:
• ~ can be set indirectly
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Shared Subscriptions
MQ Wire Format MQTT HTTP AMQP 1.0
 ~
MQI MQ OO MQTT MQ HTTP MQ Light
JMS 2 
Examples
C/MQI
JMS 2
MessageConsumer messageConsumer =
session.createSharedConsumer(topic,"mySubscription");
MessageConsumer messageConsumer =
session.createSharedDurableConsumer(topic,"myDurableSub");
nodejs/
MQ Light
client.subscribe(pattern, “myShare”, options,
function(err, pattern) { // Handle errors });
N/A
Notes:
• ~ can be set indirectly
• Not supported by C MQI
• Primarily added to MQ for JMS
2 support
• MQI has other ways of
achieving similar pattern
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Message Persistence
MQ Wire Format MQTT HTTP AMQP 1.0
 ~ 
MQI MQ OO MQTT MQ HTTP MQ Light
  ~  ~
Examples
C/MQI
MQMD md = {MQMD_DEFAULT};
md.Persistence = MQPER_PERSISTENT;
…
MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC);
JMS
MessageProducer producer = session.createProducer(dest);
producer.setDeliveryMode(DeliveryMode.PERSISTENT);
nodejs/
MQ Light
var options = { qos: mqlight.QOS_AT_LEAST_ONCE };
client.send(topic, body, options, callback);
Notes:
• ~ can be set indirectly
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Message Expiry
MQ Wire Format MQTT HTTP AMQP 1.0
  
MQI MQ OO MQTT MQ HTTP MQ Light
   
Examples
C/MQI
MQMD md = {MQMD_DEFAULT};
md.Expiry = 3000; // Expire in 5 minutes
…
MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC);
JMS
MessageProducer producer = session.createProducer(dest);
producer.setTimeToLive(300000); // Expire in 5 minutes
nodejs/
MQ Light
var options = { ttl: 300000 }; // Expire in 5 minutes
client.send(topic, body, options, callback);
Notes:
• MQ expiry value is ‘tenths of a
second’
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Message Grouping
MQ Wire Format MQTT HTTP AMQP 1.0
 
MQI MQ OO MQTT MQ HTTP MQ Light
 
Examples
C/MQI
JMS
message.setStringProperty("JMSXGroupID", groupId);
message.setIntProperty("JMSXGroupSeq", 1);
message.setBooleanProperty("JMS_IBM_Last_Msg_In_Group", true);
nodejs/
MQ Light
pmo.Options = MQPMO_LOGICAL_ORDER;
…
md.MsgFlags = MQMF_MSG_IN_GROUP; // For all but last msg
md.MsgFlags = MQMF_LAST_MSG_IN_GROUP; // For last msg
MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC);
N/A
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Message Segmentation
MQ Wire Format MQTT HTTP AMQP 1.0

MQI MQ OO MQTT MQ HTTP MQ Light
 Some langs
Examples
C/MQI
JMS
nodejs/
MQ Light
N/A
N/A
Notes:
• Not supported in most OO APIs
• Not supported on MQ z/OS
• Really a feature of the queue
manager, not the API/lang
md.MsgFlags = MQMF_SEGMENTATION_ALLOWED;
memcpy(md.GroupId, MQGI_NONE, MQ_GROUP_ID_LENGTH);
MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC);
gmo.Options = MQGMO_COMPLETE_MSG | <other options>;
MQGET(Hcon, Hobj, &md, &gmo, bufflen, buff, &msglen, &CC, &RC);
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Message Selection (1)
MQ Wire Format MQTT HTTP AMQP 1.0
 
MQI MQ OO MQTT MQ HTTP MQ Light
 
Examples
C/MQI
JMS
String selector = “NewsType = ’Sports’”;
MessageConsumer consumer =
session.createConsumer(queue, selector);
nodejs/
MQ Light
N/A
Notes:
• Use on MQOPEN to filter
queued messages
• Applies to message properties
od.SelectionString.VSPtr=“Colour=‘red’”;
od.SelectionString.VSLength=MQVS_NULL_TERMINATED;
MQOPEN(Hcon, &od, O_options, &Hobj, &CC, &RC);
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Message Selection (2)
MQ Wire Format MQTT HTTP AMQP 1.0
 
MQI MQ OO MQTT MQ HTTP MQ Light
 
Examples
C/MQI
JMS
String selector = “NewsType = ’Sports’”;
MessageConsumer consumer =
session.createConsumer(queue, selector);
nodejs/
MQ Light
N/A
Notes:
• Use on MQSUB to filter
published messages
• Applies to message properties
sd.SelectionString.VSPtr=“Colour=‘red’”;
sd.SelectionString.VSLength=MQVS_NULL_TERMINATED;
MQSUB(Hcon, &sd, &Hobj, &Hsub, &CompCode, &Reason);
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Local transactions
 Ability to put or get multiple messages to/from a destination, either all of
them or none at all
 Messages are hidden from other applications until the transaction is
committed.
 If a failure occurs mid-sequence, the transaction is rolled back and none of
the messages are delivered. Other applications are never aware of the
messages.
 If everything completes successfully, the messages are made available to
other applications.
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Local transactions
MQ Wire Format MQTT HTTP AMQP 1.0
 
MQI MQ OO MQTT MQ HTTP MQ Light
 
Examples
C/MQI
pmo.Options = MQPMO_SYNCPOINT;
MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC);
MQCMIT(Hcon, &CC, &RC);
JMS
session = connection.createSession(true,
Session.AUTO_ACKNOWLEDGE);
// Get and put messages
session.commit();
nodejs/
MQ Light
N/A
gmo.Options = MQGMO_SYNCPOINT;
MQGET(Hcon, Hobj, &md, &gmo, bufflen, buff, &msglen, &CC, &RC);
MQCMIT(Hcon, &CC, &RC);
Notes:
• Only queue manager
resources involved
• JEE containers manage JMS
transactions for you
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Global/XA transactions
 Similar to local transactions, but with multiple resources to update, e.g.
 Application consumes 5 related messages from a queue and writes them all to a
database
 If everything happens successfully, the messages are guaranteed to be removed from
the queue and written to the database
 If a failure occurs, the messages are rolled back to the queue and none are in the
database
 Potential for a transaction to go in-doubt needing manual resolution
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Global/XA transactions
MQ Wire Format MQTT HTTP AMQP 1.0

MQI MQ OO MQTT MQ HTTP MQ Light
 
Examples
C/MQI
MQBEGIN(Hcon, &bo, &CC, &RC);
// Read from database
pmo.Options = MQPMO_SYNCPOINT;
MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC);
MQCMIT(Hcon, &CC, &RC);
JMS
session = connection.createXASession();
// Read from database, put messages
xaResource = session.getXAResource();
xaResource.prepare(xaId, false);
xaResource.commit(xaId, false);
nodejs/
MQ Light
N/A
Notes:
• Multiple resources coordinated together (e.g.
MQ and Database)
• In this example the queue manager is
coordinating the transaction
• Can be coordinated by DB/WAS etc.
• Can result in in-doubt transactions if a
resource fails mid-transaction
• In JMS/JEE the container does the work
• MQ must be configured with the DB XA
libraries
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Quality of service
 Describes the level of assurance given that a message will be delivered
 At most once delivery
The message might not arrive, but it is guaranteed that you won’t receive duplicates
 At least once delivery
The message will definitely arrive, but you may receive duplicates
 Exactly once delivery
The message is guaranteed to be delivered once and exactly once.
Often considered to be the ‘best’ option but brings with it various additional costs and
complexities
Where are you measuring from?
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
At-most-once delivery
MQ Wire Format MQTT HTTP AMQP 1.0
   
MQI MQ OO MQTT MQ HTTP MQ Light
    
Examples
C/MQI
md.Persistence = MQPER_NOT_PERSISTENT;
…
MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC);
JMS
nodejs/
MQ Light
var options = { qos: mqlight.QOS_AT_MOST_ONCE };
client.send(topic, body, options, callback);
producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
session = connection.createSession(transacted,
Session.AUTO_ACKNOWLEDGE);
producer.send(destination, message)
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
At-least-once delivery
MQ Wire Format MQTT HTTP AMQP 1.0
   
MQI MQ OO MQTT MQ HTTP MQ Light
    
Examples
C/MQI
md.Persistence = MQPER_PERSISTENT;
pmo.Options = MQPMO_SYNCPOINT;
MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC);
MQCMIT(Hcon, &CC, &RC);
JMS
nodejs/
MQ Light
var options = { qos: mqlight.QOS_AT_LEAST_ONCE };
client.send(topic, body, options, callback);
Notes:
• Can’t always just turn at-least-once
ON with a single parameter
• Relates to several areas:
• Reliability of network protocol
• Persistence of messages
• Durability of subscriptions
• ACK features in client libraries
producer.setDeliveryMode(DeliveryMode.PERSISTENT);
session = connection.createSession(false,
Session.CLIENT_ACKNOWLEDGE);
message.acknowledge();
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Exactly-once delivery
MQ Wire Format MQTT HTTP AMQP 1.0
 
MQI MQ OO MQTT MQ HTTP MQ Light
  
Examples
C/MQI
MQBEGIN(Hcon, &bo, &CC, &RC);
pmo.Options = MQPMO_SYNCPOINT;
MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC);
MQCMIT(Hcon, &CC, &RC);
JMS
session = connection.createXASession();
// Put messages
xaResource = session.getXAResource();
xaResource.prepare(xaId, false);
xaResource.commit(xaId, false);
nodejs/
MQ Light
N/A
Notes:
• Requires XA/Global transactions
• Useful if messages MUST arrive
and MUSTN’T be duplicated, but:
• Network flow more complicated
• Might require a human to
resolve in-doubt transactions
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
HA Failover/Auto-Reconnect
MQ Wire Format MQTT HTTP AMQP 1.0
N/A N/A N/A N/A
MQI MQ OO MQTT MQ HTTP MQ Light
N/A N/A N/A N/A N/A
Client Built-in HA reconnect?
C MQI Client 
JMS MQ Client 
Cobol MQI Client 
MQ Base Java Client 
C++ MQ Client 
XMS C/C++/.Net 
VB 
.Net WCF 
MQ Light Node/Ruby/Java/Python clients 
Notes:
• Really a feature of the client
library rather than the wire
format or API
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
More options
MQI MQ OO MQTT MQ HTTP MQ Light
 Not base java  
Message properties
MQI MQ OO MQTT MQ HTTP MQ Light
 Not base java
or .Net/C#
some langs 
Asynchronous consume
MQI MQ OO MQTT MQ HTTP MQ Light
  
Message browsing
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Thank You - Questions?
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
Please Note
IBM’s statements regarding its plans, directions, and intent are subject to change
or withdrawal without notice at IBM’s sole discretion.
Information regarding potential future products is intended to outline our general
product direction and it should not be relied on in making a purchasing decision.
The information mentioned regarding potential future products is not a
commitment, promise, or legal obligation to deliver any material, code or
functionality. Information about potential future products may not be incorporated
into any contract. The development, release, and timing of any future features or
functionality described for our products remains at our sole discretion.
Performance is based on measurements and projections using standard IBM
benchmarks in a controlled environment. The actual throughput or performance
that any user will experience will vary depending upon many factors, including
considerations such as the amount of multiprogramming in the user’s job stream,
the I/O configuration, the storage configuration, and the workload processed.
Therefore, no assurance can be given that an individual user will achieve results
similar to those stated here.
Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016
• IBM and the IBM logo are trademarks of International Business Machines Corporation, registered
in many jurisdictions. Other marks may be trademarks or registered trademarks of their respective
owners.
• Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation
in the United States, other countries, or both.
• Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle
and/or its affiliates.
• Red Hat Enterprise Linux is a registered trademark of Red Hat, Inc. in the United States and other
countries.
• Ubuntu and Canonical are registered trademarks of Canonical Ltd.
• SUSE and SLES are registered trademarks of SUSE LLC in the United States and other countries
• Mac and OS X are trademarks of Apple Inc., registered in the U.S. and other countries
• Other company, product and service names may be trademarks, registered marks or service
marks of their respective owners.
• References in this publication to IBM products and services do not imply that IBM intends to make
them available in all countries in which IBM operates.
Trademark Statement

More Related Content

Similar to An Introduction to and Comparison of the Different APIs Supported by MQ

HHM 6894 Messaging APIs for Cloud, Enterprise and Digital Applications
HHM 6894 Messaging APIs for Cloud, Enterprise and Digital ApplicationsHHM 6894 Messaging APIs for Cloud, Enterprise and Digital Applications
HHM 6894 Messaging APIs for Cloud, Enterprise and Digital Applicationsmatthew1001
 
Hybrid Messaging with MQ Light, MQ's Beta Support for AMQP, and IBM Bluemix
Hybrid Messaging with MQ Light, MQ's Beta Support for AMQP, and IBM BluemixHybrid Messaging with MQ Light, MQ's Beta Support for AMQP, and IBM Bluemix
Hybrid Messaging with MQ Light, MQ's Beta Support for AMQP, and IBM Bluemixmatthew1001
 
MQ Support for z/OS Connect
MQ Support for z/OS ConnectMQ Support for z/OS Connect
MQ Support for z/OS ConnectMatt Leming
 
IBM MQ for z/OS The Latest and Greatest Enhancements
IBM MQ for z/OS The Latest and Greatest EnhancementsIBM MQ for z/OS The Latest and Greatest Enhancements
IBM MQ for z/OS The Latest and Greatest EnhancementsPete Siddall
 
Websphere-corporate-training-in-mumbai
Websphere-corporate-training-in-mumbai Websphere-corporate-training-in-mumbai
Websphere-corporate-training-in-mumbai vibrantuser
 
SuperConnectivity: One company’s heroic mission to deliver on the promises of...
SuperConnectivity: One company’s heroic mission to deliver on the promises of...SuperConnectivity: One company’s heroic mission to deliver on the promises of...
SuperConnectivity: One company’s heroic mission to deliver on the promises of...4DK Technologies, Inc.
 
Understanding and Using Client JBoss A-MQ APIs
Understanding and Using Client JBoss A-MQ APIsUnderstanding and Using Client JBoss A-MQ APIs
Understanding and Using Client JBoss A-MQ APIsKenneth Peeples
 
elasticRTC -- how to have your own WebRTC cloud scaling to be billions in min...
elasticRTC -- how to have your own WebRTC cloud scaling to be billions in min...elasticRTC -- how to have your own WebRTC cloud scaling to be billions in min...
elasticRTC -- how to have your own WebRTC cloud scaling to be billions in min...Luis Lopez
 
RefCard API Architecture Strategy
RefCard API Architecture StrategyRefCard API Architecture Strategy
RefCard API Architecture StrategyOCTO Technology
 
Webrtc - rich communication - quobis - victor pascual
Webrtc  - rich communication - quobis - victor pascualWebrtc  - rich communication - quobis - victor pascual
Webrtc - rich communication - quobis - victor pascualAlan Quayle
 
.NET Core Today and Tomorrow
.NET Core Today and Tomorrow.NET Core Today and Tomorrow
.NET Core Today and TomorrowJon Galloway
 
Websphere-corporate-training-in-mumbai
Websphere-corporate-training-in-mumbai Websphere-corporate-training-in-mumbai
Websphere-corporate-training-in-mumbai vibrantuser
 
Websphere-corporate-training-in-mumbai
Websphere-corporate-training-in-mumbai Websphere-corporate-training-in-mumbai
Websphere-corporate-training-in-mumbai vibrantuser
 
FrenchKit: End to End Application Development with Swift
FrenchKit: End to End Application Development with SwiftFrenchKit: End to End Application Development with Swift
FrenchKit: End to End Application Development with SwiftChris Bailey
 
Silverlight - What Is It And How Can We Use It
Silverlight - What Is It And How Can We Use ItSilverlight - What Is It And How Can We Use It
Silverlight - What Is It And How Can We Use ItVenketash (Pat) Ramadass
 
The Enterprise wants WebRTC -- and it needs Middleware to get it! (IIT RTC Co...
The Enterprise wants WebRTC -- and it needs Middleware to get it! (IIT RTC Co...The Enterprise wants WebRTC -- and it needs Middleware to get it! (IIT RTC Co...
The Enterprise wants WebRTC -- and it needs Middleware to get it! (IIT RTC Co...Brian Pulito
 
What's new in MQ 9.1.* on z/OS
What's new in MQ 9.1.* on z/OSWhat's new in MQ 9.1.* on z/OS
What's new in MQ 9.1.* on z/OSMatt Leming
 

Similar to An Introduction to and Comparison of the Different APIs Supported by MQ (20)

HHM 6894 Messaging APIs for Cloud, Enterprise and Digital Applications
HHM 6894 Messaging APIs for Cloud, Enterprise and Digital ApplicationsHHM 6894 Messaging APIs for Cloud, Enterprise and Digital Applications
HHM 6894 Messaging APIs for Cloud, Enterprise and Digital Applications
 
Hybrid Messaging with MQ Light, MQ's Beta Support for AMQP, and IBM Bluemix
Hybrid Messaging with MQ Light, MQ's Beta Support for AMQP, and IBM BluemixHybrid Messaging with MQ Light, MQ's Beta Support for AMQP, and IBM Bluemix
Hybrid Messaging with MQ Light, MQ's Beta Support for AMQP, and IBM Bluemix
 
MQ Support for z/OS Connect
MQ Support for z/OS ConnectMQ Support for z/OS Connect
MQ Support for z/OS Connect
 
IBM MQ for z/OS The Latest and Greatest Enhancements
IBM MQ for z/OS The Latest and Greatest EnhancementsIBM MQ for z/OS The Latest and Greatest Enhancements
IBM MQ for z/OS The Latest and Greatest Enhancements
 
Websphere-corporate-training-in-mumbai
Websphere-corporate-training-in-mumbai Websphere-corporate-training-in-mumbai
Websphere-corporate-training-in-mumbai
 
AMQP for phpMelb
AMQP for phpMelbAMQP for phpMelb
AMQP for phpMelb
 
SuperConnectivity: One company’s heroic mission to deliver on the promises of...
SuperConnectivity: One company’s heroic mission to deliver on the promises of...SuperConnectivity: One company’s heroic mission to deliver on the promises of...
SuperConnectivity: One company’s heroic mission to deliver on the promises of...
 
Understanding and Using Client JBoss A-MQ APIs
Understanding and Using Client JBoss A-MQ APIsUnderstanding and Using Client JBoss A-MQ APIs
Understanding and Using Client JBoss A-MQ APIs
 
elasticRTC -- how to have your own WebRTC cloud scaling to be billions in min...
elasticRTC -- how to have your own WebRTC cloud scaling to be billions in min...elasticRTC -- how to have your own WebRTC cloud scaling to be billions in min...
elasticRTC -- how to have your own WebRTC cloud scaling to be billions in min...
 
Ivr worx
Ivr worxIvr worx
Ivr worx
 
Webrtc in Real world
Webrtc in Real world Webrtc in Real world
Webrtc in Real world
 
RefCard API Architecture Strategy
RefCard API Architecture StrategyRefCard API Architecture Strategy
RefCard API Architecture Strategy
 
Webrtc - rich communication - quobis - victor pascual
Webrtc  - rich communication - quobis - victor pascualWebrtc  - rich communication - quobis - victor pascual
Webrtc - rich communication - quobis - victor pascual
 
.NET Core Today and Tomorrow
.NET Core Today and Tomorrow.NET Core Today and Tomorrow
.NET Core Today and Tomorrow
 
Websphere-corporate-training-in-mumbai
Websphere-corporate-training-in-mumbai Websphere-corporate-training-in-mumbai
Websphere-corporate-training-in-mumbai
 
Websphere-corporate-training-in-mumbai
Websphere-corporate-training-in-mumbai Websphere-corporate-training-in-mumbai
Websphere-corporate-training-in-mumbai
 
FrenchKit: End to End Application Development with Swift
FrenchKit: End to End Application Development with SwiftFrenchKit: End to End Application Development with Swift
FrenchKit: End to End Application Development with Swift
 
Silverlight - What Is It And How Can We Use It
Silverlight - What Is It And How Can We Use ItSilverlight - What Is It And How Can We Use It
Silverlight - What Is It And How Can We Use It
 
The Enterprise wants WebRTC -- and it needs Middleware to get it! (IIT RTC Co...
The Enterprise wants WebRTC -- and it needs Middleware to get it! (IIT RTC Co...The Enterprise wants WebRTC -- and it needs Middleware to get it! (IIT RTC Co...
The Enterprise wants WebRTC -- and it needs Middleware to get it! (IIT RTC Co...
 
What's new in MQ 9.1.* on z/OS
What's new in MQ 9.1.* on z/OSWhat's new in MQ 9.1.* on z/OS
What's new in MQ 9.1.* on z/OS
 

More from matthew1001

Building an Active-Active IBM MQ System
Building an Active-Active IBM MQ SystemBuilding an Active-Active IBM MQ System
Building an Active-Active IBM MQ Systemmatthew1001
 
Monitoring and problem determination of your mq distributed systems
Monitoring and problem determination of your mq distributed systemsMonitoring and problem determination of your mq distributed systems
Monitoring and problem determination of your mq distributed systemsmatthew1001
 
HHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud World
HHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud WorldHHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud World
HHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud Worldmatthew1001
 
An introduction to mq light and bluemix
An introduction to mq light and bluemixAn introduction to mq light and bluemix
An introduction to mq light and bluemixmatthew1001
 
Mq light, mq, and bluemix web sphere user group july 2015
Mq light, mq, and bluemix   web sphere user group july 2015Mq light, mq, and bluemix   web sphere user group july 2015
Mq light, mq, and bluemix web sphere user group july 2015matthew1001
 
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conference
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conferenceIBM MQ Light @ Capitalware's MQTC 2.0.1.4 conference
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conferencematthew1001
 
WebSphere MQ Managed File Transfer V8 - Capitalware MQTC Conference
WebSphere MQ Managed File Transfer V8 - Capitalware MQTC ConferenceWebSphere MQ Managed File Transfer V8 - Capitalware MQTC Conference
WebSphere MQ Managed File Transfer V8 - Capitalware MQTC Conferencematthew1001
 
How to develop responsive applications with ibm web sphere mq light
How to develop responsive applications with ibm web sphere mq lightHow to develop responsive applications with ibm web sphere mq light
How to develop responsive applications with ibm web sphere mq lightmatthew1001
 

More from matthew1001 (8)

Building an Active-Active IBM MQ System
Building an Active-Active IBM MQ SystemBuilding an Active-Active IBM MQ System
Building an Active-Active IBM MQ System
 
Monitoring and problem determination of your mq distributed systems
Monitoring and problem determination of your mq distributed systemsMonitoring and problem determination of your mq distributed systems
Monitoring and problem determination of your mq distributed systems
 
HHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud World
HHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud WorldHHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud World
HHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud World
 
An introduction to mq light and bluemix
An introduction to mq light and bluemixAn introduction to mq light and bluemix
An introduction to mq light and bluemix
 
Mq light, mq, and bluemix web sphere user group july 2015
Mq light, mq, and bluemix   web sphere user group july 2015Mq light, mq, and bluemix   web sphere user group july 2015
Mq light, mq, and bluemix web sphere user group july 2015
 
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conference
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conferenceIBM MQ Light @ Capitalware's MQTC 2.0.1.4 conference
IBM MQ Light @ Capitalware's MQTC 2.0.1.4 conference
 
WebSphere MQ Managed File Transfer V8 - Capitalware MQTC Conference
WebSphere MQ Managed File Transfer V8 - Capitalware MQTC ConferenceWebSphere MQ Managed File Transfer V8 - Capitalware MQTC Conference
WebSphere MQ Managed File Transfer V8 - Capitalware MQTC Conference
 
How to develop responsive applications with ibm web sphere mq light
How to develop responsive applications with ibm web sphere mq lightHow to develop responsive applications with ibm web sphere mq light
How to develop responsive applications with ibm web sphere mq light
 

Recently uploaded

Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineeringssuserb3a23b
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 

Recently uploaded (20)

Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineering
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 

An Introduction to and Comparison of the Different APIs Supported by MQ

  • 1. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 An Introduction to, and Comparison of, the Different MQ APIs Matthew Whitehead IBM MQ Development mwhitehead@uk.ibm.com
  • 2. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Agenda • Languages, Wire Formats, and APIs • An Overview of C MQI, JMS, and MQ Light • Recap of the Key MQ Features • Features supported in the different MQ APIs
  • 3. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Agenda • Languages, Wire Formats, and APIs • An Overview of C MQI, JMS, and MQ Light • Recap of the Key MQ Features • Features supported in the different MQ APIs
  • 4. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats APIs Languages/ Runtimes
  • 5. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes
  • 6. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT
  • 7. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP
  • 8. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0
  • 9. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 MQI
  • 10. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 MQI MQ Object Oriented
  • 11. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 MQI XMS MQ Object Oriented
  • 12. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 MQI XMS MQ Object Oriented WCF
  • 13. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 MQI XMS MQ Object Oriented WCF JMS
  • 14. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 MQI XMS MQ Object Oriented WCF JMS MQTT
  • 15. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 MQI XMS MQ Object Oriented WCF JMS MQ HTTPMQTT
  • 16. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
  • 17. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 MQI XMS MQ Object Oriented WCF JMS MQTT MQ HTTP MQ Light
  • 18. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 MQI XMS WCF JMS MQTT MQ Object Oriented MQ HTTP MQ Light
  • 19. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 MQI XMS WCF JMS MQTT MQ Object Oriented MQ HTTP MQ Light
  • 20. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 MQI XMS WCF JMS MQTT MQ Object Oriented MQ HTTP MQ Light
  • 21. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
  • 22. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
  • 23. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
  • 24. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
  • 25. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ Perl MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
  • 26. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ Perl C MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
  • 27. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ Perl C ActiveX MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
  • 28. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ Perl C ActiveX WCF MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
  • 29. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ Perl C ActiveX WCF Java MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
  • 30. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ Perl C ActiveX WCF Java .Net MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
  • 31. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ Perl C ActiveX WCF Java .Net MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ Light C# MQ HTTP MQ Light
  • 32. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ Perl C ActiveX WCF Java .Net Ruby MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ Light C# MQ HTTP MQ Light
  • 33. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ Perl C ActiveX WCF Java .Net nodejs Ruby MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ Light C# MQ HTTP MQ Light
  • 34. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ Perl C ActiveX WCF Java .Net nodejs Ruby MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ Light C# MQ HTTP MQ Light
  • 35. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB Perl C ActiveX WCF Java .Net nodejs Ruby C++ MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ Light C# Native C++ is now stabilised. Recommendations are XMS or the C MQI MQ HTTP MQ Light
  • 36. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ Perl C ActiveX WCF Java .Net nodejs Ruby Base Java is now stabilised. JMS the recommended MQ- Java interface C# MQI XMS MQ Object Oriented (Base Java) WCF JMS HTTPMQTT MQ LightMQ HTTP MQ Light
  • 37. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ Perl C ActiveX WCF Java .Net nodejs Ruby C# MQI XMS MQ Object Oriented (Base Java) WCF JMS HTTPMQTT MQ LightHTTP MQ LightMQ HTTP MQ Light
  • 38. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats MQ Wire Format (& Local Bindings) APIs Languages/ Runtimes MQTT HTTP AMQP 1.0 Cobol PL/1 VB C++ Perl C ActiveX WCF Java .Net nodejs Ruby C# MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ LightHTTP MQ LightMQ HTTP MQ Light
  • 39. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Languages, Wire Formats, and APIs QM Wire Formats C Cobol Java WCF PL/1 VB .Net C++ Perl ActiveX MQ Wire Format (& Local Bindings) AMQP 1.0MQTT nodejs Ruby HTTP APIs Languages/ Runtimes C# MQI XMS MQ Object Oriented WCF JMS HTTPMQTT MQ LightHTTP MQ LightMQ HTTP MQ Light
  • 40. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Agenda • Languages, Wire Formats, and APIs • An Overview of C MQI, JMS, and MQ Light • Recap of the Key MQ Features • Features supported in the different MQ APIs
  • 41. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 C MQI Overview 1/4 Structures MQMD – Message descriptor MQCNO – Connect options MQOD – Object descriptor MQGMO – Get message options MQSD – Subscription descriptor MQPMO – Put message options MQPD – Property descriptor MQCSP – Security parameters MQCD – Client channel descriptor Verbs MQCONN – Connect to QM MQOPEN – Open queue/topic MQCONNX – Connect with opts MQCLOSE – Close queue/topic MQDISC – Disconnect from QM MQPUT - Put/publish a msg MQBEGIN – Start global transaction MQPUT1 – Open/put/close MQCMIT – Commit transaction MQGET – Get message MQBACK – Rollback transaction MQSUB – Subscribe to topic MQINQ – Inquire about object MQCTL – Control callbacks MQSET – Set object attribute
  • 42. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 C MQI Overview 1/4 Constants - Completion codes MQCC_OK – Verb completed OK MQCC_WARNING – Verb completed but with warnings (see MQRC) MQCC_FAILED – Verb failed Constants - Return codes (there are many of these), e.g: MQRC_NONE – Nothing to check MQRC_Q_MGR_QUIESCING – Can’t do the action – QM is stopping MQRC_NOT_AUTHORIZED – Can’t do the action – you’re not authorzed MQRC_TRUNCATED_MSG_ACCEPTED – The message is too big for the buffer MQRC_MSG_TOO_BIG_FOR_Q – Guess what this means… Constants - Misc (there are loads of these), e.g: MQIA_CURRENT_Q_DEPTH, MQCACH_CHANNEL_NAME, MQCA_CLUSTER_NAME, …
  • 43. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 C MQI Overview 1/4 MQOD od = {MQOD_DEFAULT}; /* Object Descriptor */ MQMD md = {MQMD_DEFAULT}; /* Message Descriptor */ MQPMO pmo = {MQPMO_DEFAULT}; /* put message options */ MQCNO cno = {MQCNO_DEFAULT}; /* connection options */ MQCSP csp = {MQCSP_DEFAULT}; /* security parameters */ MQHCONN Hcon; /* connection handle */ MQHOBJ Hobj; /* object handle */ MQLONG O_options; /* MQOPEN options */ MQLONG C_options; /* MQCLOSE options */ MQLONG CompCode; /* completion code */ MQLONG OpenCode; /* MQOPEN completion code */ MQLONG Reason; /* reason code */ MQLONG CReason; /* reason code for MQCONNX */ MQLONG messlen; /* message length */ char buffer[65535]; /* message buffer */ char QMName[50]; /* queue manager name */ char *UserId; /* UserId for authentication */ char Password[MQ_CSP_PASSWORD_LENGTH + 1] = {0}; /* For auth */
  • 44. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 2/4 MQCONNX(QMName, /* queue manager */ &cno, /* connection options */ &Hcon, /* connection handle */ &CompCode, /* completion code */ &CReason); /* reason code */ if (CompCode == MQCC_FAILED) { // Something went wrong – print out the error and quit } if (CompCode == MQCC_WARNING) { // Handle the warning, decide whether to continue } C MQI Overview
  • 45. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 3/4 O_options = MQOO_OUTPUT /* open queue for output */ | MQOO_FAIL_IF_QUIESCING; /* but not if MQM stopping */ MQOPEN(Hcon, /* connection handle */ &od, /* object descriptor for queue */ O_options, /* open options */ &Hobj, /* object handle */ &OpenCode, /* MQOPEN completion code */ &Reason); /* reason code */ if (OpenCode == MQCC_FAILED) { // Something went wrong – print the error and quit } if (Reason != MQRC_NONE) { // Something went wrong – print the error and quit } C MQI Overview
  • 46. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 4/4 if (fgets(buffer, sizeof(buffer), stdin) != NULL) /* read a message from keyboard input */ { messlen = (MQLONG)strlen(buffer); /* get the length of the message */ if (buffer[messlen-1] == 'n') /* remove the last newline character */ { buffer[messlen-1] = '0'; --messlen; } memcpy(md.MsgId, MQMI_NONE, sizeof(md.MsgId) ); MQPUT(Hcon, /* connection handle */ Hobj, /* object handle */ &md, /* message descriptor */ &pmo, /* default options (datagram) */ messlen, /* message length */ buffer, /* message buffer */ &CompCode, /* completion code */ &Reason); /* reason code */ if (Reason != MQRC_NONE) { // Print out reason code and quit } } C MQI Overview
  • 47. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 JMS Overview 1/4 Objects ConnectionFactory – from which connections are created Connection – from which sessions are created Session – from which producers, consumers, and destinations are created Destination – to which messages are sent (Queue and Topic sub-types) MessageProducer – with which messages are sent MessageConsumer – with which messages are received QueueBrowser – with which messages are browsed from a queue TextMessage/BytesMessage/ObjectMessage/MapMessage/StreamMessage JMSContext – JMS 2 – combination of connection and session JMSProducer and JMSConsumer – JMS 2 Key Actions connection.start(…) <- (not required in JMS 2) session.createProducer(..) session.createConsumer(…) producer.send(…) consumer.receiveWithWait(…) message.acknowledge() connection.close()
  • 48. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 1/3 Connection connection = null; Session session = null; Destination destination = null; MessageProducer producer = null; try { // Create a connection factory JmsFactoryFactory ff = JmsFactoryFactory.getInstance(WMQConstants.WMQ_PROVIDER); JmsConnectionFactory cf = ff.createConnectionFactory(); // Set up connection properties cf.setStringProperty(WMQConstants.WMQ_HOST_NAME, host); cf.setIntProperty(WMQConstants.WMQ_PORT, port); cf.setStringProperty(WMQConstants.WMQ_CHANNEL, channel); cf.setStringProperty(WMQConstants.WMQ_QUEUE_MANAGER, queueManagerName); cf.setStringProperty(WMQConstants.USERID, user); cf.setStringProperty(WMQConstants.PASSWORD, password); cf.setBooleanProperty(WMQConstants.USER_AUTHENTICATION_MQCSP, true); } catch (JMSException e) { // Handle exceptions here } JMS Overview
  • 49. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 2/3 // Create JMS objects connection = cf.createConnection(); // MQCONN is made under the covers session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); if (isTopic) { destination = session.createTopic(destinationName); } else { destination = session.createQueue(destinationName); } // MQOPEN is performed under the covers producer = session.createProducer(destination); JMS Overview
  • 50. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 3/3 try { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); do { System.out.print("Enter some text to be sent <ENTER to finish>:"); System.out.flush(); String line = in.readLine(); if (line != null && line.trim().length() != 0) { TextMessage message = session.createTextMessage(line); producer.send(message); // MQPUT happens under the covers System.out.println("Sent message:n" + message); } } while (line != null); } catch (Exception JMSException | IOException e) { // Handle exceptions here } JMS Overview
  • 51. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 MQ Light Overview (nodejs client) 1/4 Library Import var mqlight = require(‘mqlight’); Client instantiation var opts = {service: “amqp://localhost”, id: “matt” }; var client = mqlight.createClient(opts); Client-connected callback client.on(‘started’, function() {<code to run when the client has connected>}); Client-error callback client.on(‘error’, function() {<code to run when the client has an error>});
  • 52. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 MQ Light Overview (nodejs client) 1/4 Message-received callback client.on(‘message’, function(data, delivery) {<code to run when a message is received>}); Malformed-message-received callback client.on(‘malformed’, function(data, delivery) {<code to run when a malformed message is received>}); Client subscribe, plus client-subscribed callback client.subscribe(pattern, share, options, function(err, pattern) {<code to run when the subscribe returns>}); Send message, plus message-sent or message-not-sent callback var buffered = !client.send(topic, body, options, callback);
  • 53. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 1/2 var mqlight = require('mqlight'); // Import the MQ Light client module var nopt = require('nopt'); var uuid = require('node-uuid'); var fs = require('fs'); var opts = { // Define configuration options service: “amqp://localhost:5672”, id: “client-01” }; var client = mqlight.createClient(opts); // Create the connection MQ Light Overview
  • 54. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 2/2 // Once we have connected we can start sending messages client.on('started', function() { var sendNextMessage = function() { setImmediate(sendMessage); } }; var sendMessage = function() { var options = { qos: mqlight.QOS_AT_LEAST_ONCE }; var callback = function(err, topic, data, options) { if (err) { // The send failed – print the error and quit } else { // Nothing to do – send took place successfully } } client.send(topic, body, options, callback); } } MQ Light Overview
  • 55. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Agenda • A refresher on C, JMS, and MQ Light • An Overview of C MQI, JMS, and MQ Light • Recap of the Key MQ Features • Features supported in the different MQ APIs
  • 56. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016  Point-to-Point messaging  Publish/Subscribe messaging  Shared Subscriptions  Message persistence  Message expiry  Message grouping  Message segmentation  Message selection  Local transactions  XA/Global transactions  At least once/at most once/exactly once delivery  HA failover MQ features  Message properties  Asynchronous Consume  Message browsing
  • 57. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Point-to-Point Messaging MQ Wire Format MQTT HTTP AMQP 1.0  ~ MQI MQ OO MQTT MQ HTTP MQ Light    ~ Examples C/MQI strncpy(od.ObjectName, “Q1”, (size_t)MQ_Q_NAME_LENGTH); MQOPEN(Hcon, &od, O_options,&Hobj, &OpenCode, &Reason); JMS destination = session.createQueue(“Q1”); producer = session.createProducer(destination); nodejs/ MQ Light Notes: • ~ can be set indirectly client.send(“Q1”, body, options, callback);
  • 58. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Publish/Subscribe Messaging MQ Wire Format MQTT HTTP AMQP 1.0   ~ MQI MQ OO MQTT MQ HTTP MQ Light      Examples C/MQI od.ObjectString.VSPtr=“my/first/messaging/topic”; od.ObjectString.VSLength=(MQLONG)strlen(argv[1]); od.ObjectType = MQOT_TOPIC; MQOPEN(Hcon, &od, O_options,&Hobj, &OpenCode, &Reason); JMS destination = session.createTopic(“my/first/topic”); producer = session.createProducer(destination); nodejs/ MQ Light client.send(“my/first/messaging/topic”, body, options, callback); Notes: • ~ can be set indirectly
  • 59. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Shared Subscriptions MQ Wire Format MQTT HTTP AMQP 1.0  ~ MQI MQ OO MQTT MQ HTTP MQ Light JMS 2  Examples C/MQI JMS 2 MessageConsumer messageConsumer = session.createSharedConsumer(topic,"mySubscription"); MessageConsumer messageConsumer = session.createSharedDurableConsumer(topic,"myDurableSub"); nodejs/ MQ Light client.subscribe(pattern, “myShare”, options, function(err, pattern) { // Handle errors }); N/A Notes: • ~ can be set indirectly • Not supported by C MQI • Primarily added to MQ for JMS 2 support • MQI has other ways of achieving similar pattern
  • 60. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Message Persistence MQ Wire Format MQTT HTTP AMQP 1.0  ~  MQI MQ OO MQTT MQ HTTP MQ Light   ~  ~ Examples C/MQI MQMD md = {MQMD_DEFAULT}; md.Persistence = MQPER_PERSISTENT; … MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC); JMS MessageProducer producer = session.createProducer(dest); producer.setDeliveryMode(DeliveryMode.PERSISTENT); nodejs/ MQ Light var options = { qos: mqlight.QOS_AT_LEAST_ONCE }; client.send(topic, body, options, callback); Notes: • ~ can be set indirectly
  • 61. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Message Expiry MQ Wire Format MQTT HTTP AMQP 1.0    MQI MQ OO MQTT MQ HTTP MQ Light     Examples C/MQI MQMD md = {MQMD_DEFAULT}; md.Expiry = 3000; // Expire in 5 minutes … MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC); JMS MessageProducer producer = session.createProducer(dest); producer.setTimeToLive(300000); // Expire in 5 minutes nodejs/ MQ Light var options = { ttl: 300000 }; // Expire in 5 minutes client.send(topic, body, options, callback); Notes: • MQ expiry value is ‘tenths of a second’
  • 62. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Message Grouping MQ Wire Format MQTT HTTP AMQP 1.0   MQI MQ OO MQTT MQ HTTP MQ Light   Examples C/MQI JMS message.setStringProperty("JMSXGroupID", groupId); message.setIntProperty("JMSXGroupSeq", 1); message.setBooleanProperty("JMS_IBM_Last_Msg_In_Group", true); nodejs/ MQ Light pmo.Options = MQPMO_LOGICAL_ORDER; … md.MsgFlags = MQMF_MSG_IN_GROUP; // For all but last msg md.MsgFlags = MQMF_LAST_MSG_IN_GROUP; // For last msg MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC); N/A
  • 63. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Message Segmentation MQ Wire Format MQTT HTTP AMQP 1.0  MQI MQ OO MQTT MQ HTTP MQ Light  Some langs Examples C/MQI JMS nodejs/ MQ Light N/A N/A Notes: • Not supported in most OO APIs • Not supported on MQ z/OS • Really a feature of the queue manager, not the API/lang md.MsgFlags = MQMF_SEGMENTATION_ALLOWED; memcpy(md.GroupId, MQGI_NONE, MQ_GROUP_ID_LENGTH); MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC); gmo.Options = MQGMO_COMPLETE_MSG | <other options>; MQGET(Hcon, Hobj, &md, &gmo, bufflen, buff, &msglen, &CC, &RC);
  • 64. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Message Selection (1) MQ Wire Format MQTT HTTP AMQP 1.0   MQI MQ OO MQTT MQ HTTP MQ Light   Examples C/MQI JMS String selector = “NewsType = ’Sports’”; MessageConsumer consumer = session.createConsumer(queue, selector); nodejs/ MQ Light N/A Notes: • Use on MQOPEN to filter queued messages • Applies to message properties od.SelectionString.VSPtr=“Colour=‘red’”; od.SelectionString.VSLength=MQVS_NULL_TERMINATED; MQOPEN(Hcon, &od, O_options, &Hobj, &CC, &RC);
  • 65. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Message Selection (2) MQ Wire Format MQTT HTTP AMQP 1.0   MQI MQ OO MQTT MQ HTTP MQ Light   Examples C/MQI JMS String selector = “NewsType = ’Sports’”; MessageConsumer consumer = session.createConsumer(queue, selector); nodejs/ MQ Light N/A Notes: • Use on MQSUB to filter published messages • Applies to message properties sd.SelectionString.VSPtr=“Colour=‘red’”; sd.SelectionString.VSLength=MQVS_NULL_TERMINATED; MQSUB(Hcon, &sd, &Hobj, &Hsub, &CompCode, &Reason);
  • 66. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Local transactions  Ability to put or get multiple messages to/from a destination, either all of them or none at all  Messages are hidden from other applications until the transaction is committed.  If a failure occurs mid-sequence, the transaction is rolled back and none of the messages are delivered. Other applications are never aware of the messages.  If everything completes successfully, the messages are made available to other applications.
  • 67. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Local transactions MQ Wire Format MQTT HTTP AMQP 1.0   MQI MQ OO MQTT MQ HTTP MQ Light   Examples C/MQI pmo.Options = MQPMO_SYNCPOINT; MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC); MQCMIT(Hcon, &CC, &RC); JMS session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE); // Get and put messages session.commit(); nodejs/ MQ Light N/A gmo.Options = MQGMO_SYNCPOINT; MQGET(Hcon, Hobj, &md, &gmo, bufflen, buff, &msglen, &CC, &RC); MQCMIT(Hcon, &CC, &RC); Notes: • Only queue manager resources involved • JEE containers manage JMS transactions for you
  • 68. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Global/XA transactions  Similar to local transactions, but with multiple resources to update, e.g.  Application consumes 5 related messages from a queue and writes them all to a database  If everything happens successfully, the messages are guaranteed to be removed from the queue and written to the database  If a failure occurs, the messages are rolled back to the queue and none are in the database  Potential for a transaction to go in-doubt needing manual resolution
  • 69. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Global/XA transactions MQ Wire Format MQTT HTTP AMQP 1.0  MQI MQ OO MQTT MQ HTTP MQ Light   Examples C/MQI MQBEGIN(Hcon, &bo, &CC, &RC); // Read from database pmo.Options = MQPMO_SYNCPOINT; MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC); MQCMIT(Hcon, &CC, &RC); JMS session = connection.createXASession(); // Read from database, put messages xaResource = session.getXAResource(); xaResource.prepare(xaId, false); xaResource.commit(xaId, false); nodejs/ MQ Light N/A Notes: • Multiple resources coordinated together (e.g. MQ and Database) • In this example the queue manager is coordinating the transaction • Can be coordinated by DB/WAS etc. • Can result in in-doubt transactions if a resource fails mid-transaction • In JMS/JEE the container does the work • MQ must be configured with the DB XA libraries
  • 70. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Quality of service  Describes the level of assurance given that a message will be delivered  At most once delivery The message might not arrive, but it is guaranteed that you won’t receive duplicates  At least once delivery The message will definitely arrive, but you may receive duplicates  Exactly once delivery The message is guaranteed to be delivered once and exactly once. Often considered to be the ‘best’ option but brings with it various additional costs and complexities Where are you measuring from?
  • 71. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 At-most-once delivery MQ Wire Format MQTT HTTP AMQP 1.0     MQI MQ OO MQTT MQ HTTP MQ Light      Examples C/MQI md.Persistence = MQPER_NOT_PERSISTENT; … MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC); JMS nodejs/ MQ Light var options = { qos: mqlight.QOS_AT_MOST_ONCE }; client.send(topic, body, options, callback); producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE); producer.send(destination, message)
  • 72. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 At-least-once delivery MQ Wire Format MQTT HTTP AMQP 1.0     MQI MQ OO MQTT MQ HTTP MQ Light      Examples C/MQI md.Persistence = MQPER_PERSISTENT; pmo.Options = MQPMO_SYNCPOINT; MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC); MQCMIT(Hcon, &CC, &RC); JMS nodejs/ MQ Light var options = { qos: mqlight.QOS_AT_LEAST_ONCE }; client.send(topic, body, options, callback); Notes: • Can’t always just turn at-least-once ON with a single parameter • Relates to several areas: • Reliability of network protocol • Persistence of messages • Durability of subscriptions • ACK features in client libraries producer.setDeliveryMode(DeliveryMode.PERSISTENT); session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE); message.acknowledge();
  • 73. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Exactly-once delivery MQ Wire Format MQTT HTTP AMQP 1.0   MQI MQ OO MQTT MQ HTTP MQ Light    Examples C/MQI MQBEGIN(Hcon, &bo, &CC, &RC); pmo.Options = MQPMO_SYNCPOINT; MQPUT(Hcon, Hobj, &md, &pmo, messlen, buffer, &CC, &RC); MQCMIT(Hcon, &CC, &RC); JMS session = connection.createXASession(); // Put messages xaResource = session.getXAResource(); xaResource.prepare(xaId, false); xaResource.commit(xaId, false); nodejs/ MQ Light N/A Notes: • Requires XA/Global transactions • Useful if messages MUST arrive and MUSTN’T be duplicated, but: • Network flow more complicated • Might require a human to resolve in-doubt transactions
  • 74. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 HA Failover/Auto-Reconnect MQ Wire Format MQTT HTTP AMQP 1.0 N/A N/A N/A N/A MQI MQ OO MQTT MQ HTTP MQ Light N/A N/A N/A N/A N/A Client Built-in HA reconnect? C MQI Client  JMS MQ Client  Cobol MQI Client  MQ Base Java Client  C++ MQ Client  XMS C/C++/.Net  VB  .Net WCF  MQ Light Node/Ruby/Java/Python clients  Notes: • Really a feature of the client library rather than the wire format or API
  • 75. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 More options MQI MQ OO MQTT MQ HTTP MQ Light  Not base java   Message properties MQI MQ OO MQTT MQ HTTP MQ Light  Not base java or .Net/C# some langs  Asynchronous consume MQI MQ OO MQTT MQ HTTP MQ Light    Message browsing
  • 76. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Thank You - Questions?
  • 77. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 Please Note IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. The development, release, and timing of any future features or functionality described for our products remains at our sole discretion. Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user’s job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.
  • 78. Capitalware's MQ Technical Conference v2.0.1.6Copyright © IBM 2016 • IBM and the IBM logo are trademarks of International Business Machines Corporation, registered in many jurisdictions. Other marks may be trademarks or registered trademarks of their respective owners. • Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. • Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates. • Red Hat Enterprise Linux is a registered trademark of Red Hat, Inc. in the United States and other countries. • Ubuntu and Canonical are registered trademarks of Canonical Ltd. • SUSE and SLES are registered trademarks of SUSE LLC in the United States and other countries • Mac and OS X are trademarks of Apple Inc., registered in the U.S. and other countries • Other company, product and service names may be trademarks, registered marks or service marks of their respective owners. • References in this publication to IBM products and services do not imply that IBM intends to make them available in all countries in which IBM operates. Trademark Statement