Closed JakesIV closed 5 years ago
Excellent that worked for me. I will post another issue which I have picked up when reading messages with format MQHRF2 (not sure if the is a spelling error in RFHUTIL, I always thought it was MQRFH2 header). This one fails way before it gets to my code.
I just want to know if it would be possible to consume MQEvent format (PCF messages) using this API. I did try and keep on getting this error "MQJE001: Completion Code '2', Reason '3013'." which according the big Google is because JMS do not support the additional MQ headers. I have used the method described here to convert the byte message to PCF. https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q128400_.htm I saw this discussion but I had conclusion. http://www.mqseries.net/phpBB2/viewtopic.php?t=71804 Could you please help and if you also ask why one want to process PCF message in JMS the answer is simple to process MQ event messages to push to ELK stack
Sample code `@JmsListener(destination = "SYSTEM.ADMIN.QMGR.EVENT") public void onQmgrEventMessage(final BytesMessage message) { try { int bodySize = (int) message.getBodyLength();
byte[] data = new byte[bodySize];
message.readBytes(data);
}`