MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = CMQC.MQGMO_PROPERTIES_FORCE_MQRFH2 + CMQC.MQGMO_FAIL_IF_QUIESCING + CMQC.MQGMO_NO_WAIT;
MQMessage receiveMsg = new MQMessage();
queue.get(receiveMsg, gmo);
if (CMQC.MQFMT_RF_HEADER_2.equals(receiveMsg.format)){
receiveMsg.seek(0);
byte[] b = new byte[receiveMsg.getMessageLength()];
DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(b));
MQRFH2 rfh2 = new MQRFH2(inputStream );
int strucLen = rfh2.getStrucLength();
int encoding = rfh2.getEncoding();
int CCSID = rfh2.getCodedCharSetId();
String format= rfh2.getFormat();
int flags = rfh2.getFlags();
int nameValueCCSID = rfh2.getNameValueCCSID();
String[] folderStrings = rfh2.getFolderStrings();
for (String folder : folderStrings)
System.out.println("Folder: "+folder);
b = new byte[inputStream.available()];
inputStream.read(b);
System.out.println("Data: "+new String(b));
}else if (CMQC.MQFMT_STRING.equals(receiveMsg.format)){
String msgStr = receiveMsg.readStringOfByteLength(receiveMsg.getMessageLength());
System.out.println("Data: "+msgStr);
}else{
byte[] b = new byte[receiveMsg.getMessageLength()];
receiveMsg.readFully(b);
System.out.println("Data: "+new String(b));
}
Showing posts with label MQ. Show all posts
Showing posts with label MQ. Show all posts
Monday, June 1, 2020
Sunday, February 23, 2020
IBM Integration Bus - Webphere MQ
For using the Webphere MQ in IIB, We have installed the MQ Client at least. Download MQ Client in https://developer.ibm.com/messaging/mq-downloads/
The command above, create the MQ Security Identity name is queueid
After finish, We create 1 flow, and drag and drop a MQ node( Like: MQInput,...)
We have choose the Properties of Node. In Basic Tab, input the Queue Name
In "MQ Connection Tab":
Create the MQ Security Identity:
Create the MQ Security Identity with below command line:mqsisetdbparms integrationNodeName -n mq::queueid-u username -p password
The command above, create the MQ Security Identity name is queueid
Config the MQ node
After finish, We create 1 flow, and drag and drop a MQ node( Like: MQInput,...)
We have choose the Properties of Node. In Basic Tab, input the Queue Name
In "MQ Connection Tab":
- Select "MQ client connection Properties" in Connection
- Input Queue Manager, Host name, port, Channel Name and Security Identity( ex: queueid that is create before)
Subscribe to:
Posts (Atom)
Install and use xorg-server on macOS via Homebrew
The instructions to install and use xorg-server on macOS via Homebrew: Install Homebrew (if you haven't already): /bin/bash -c ...

-
Ref: https://blogs.sap.com/2016/11/25/get-to-know-camels-simple-expression-language-in-hci/ Introduction Simple is a, well, simple express...
-
WebRequest The function sends an HTTP request to a specified server. The function has two versions: 1. Sending simple requests of typ...
-
Important note about OLE automation: OLE automation interface is provided to control AmiBroker from the OUTSIDE process (such as windows ...