How to use phpamqplib with IBM mq amqp - ibm-mq

I am trying to use phpamqplib or pecl amqp to send messages to IBM MQ trough amqp protocol.
With phpamqplib I get: 
3/21/20 19:04:28.965 AMQXR0021W: Client 'null' at network address '......' disconnected abnormally 
with exception 'Received fatal alert: unknown_ca'. 
I am specifying the cacert and have imported it in the keystore. 
Pecl amqp - cannot find working example with ssl .
Is there some php library that I can use for IBM MQ?
Thank you

IBM has a support document on using PHP with IBM MQ here.
In the document, they use PECL.
There are other PHP/IBM MQ user projects in GitHub:
amabnl / php-mqseries
rstmpw / ibmmq

Related

wso2esb 5.0 - send message from WSO2 to client via WebSocket

I noticed that WSO2 5.0 released new functionality - websockets. I have familiarized a little bit with these tutorials:
WebSocket Support
I see that it is possible to send messages from client to WSO2/Backend via WebSockets, but I did not understand if revers communication is available - from WSO2 to client via WebSockets.
I would like to read the message from RabbitMQ in WSO2 ESB and send that message to the JavaScript client connected to the WSO2 via WebSocket.
I will appreciate any code examples.
Thank you in advance!
By assuming your jvascript as a web socket endpoint, you can merely use web socket sender [1] to send the message there.
[1] https://docs.wso2.com/display/ESB500/Sending+a+Message+from+a+HTTP+Client+to+a+WebSocket+Endpoint

Connect to a remote MQ with WebSphere Message Broker

An MQ Input node can only connect to the MQ that is bound to the MessageBroker installation. I would like to connect to a remote MQ. I would like to avoid using the JMS Input.
Would it be possible to use the MQ Service for connecting to a remote MQ?
I'm using tve version 9, so actually the IIB.
You can deliver outbound messages to remote queue managers via the broker's queue manager if suitable channels and xmit queues are setup.
This however is not the same as a client connection to a remote queue manager which is not currently supported.
You could use a JCN to call the MQ base API or you could raise a request for enhancement here:
http://www.ibm.com/developerworks/rfe/?PROD_ID=532

WAS MQ .net Consumer need WAS MQ Client?

I have a WAS MQ server and some queues which have couple of messages. I have a java consumer to get those messages and everything is OK. When I want to get those messages by .net or delphi application; it's not working and throw an error code 2058. When I install WAS MQ Client in my PC; the error went away.
I want to install my .net app in more than 25 clients and I do not want to install WAS MQ Client to all of those clients. Is there a .dll or configuration or something like that to avoid install WAS MQ Client?
I am using these two dll: amqmdnet.dll, amqmdxcs.dll
Unfortunately It's not possible for now.
See below link for more details:
.net using IBM MQ without full MQ client install
Here is a good document to solve this problem.
I think in .NET we have to using Managed Connections instead of MQ Client.

connect to ibm mq broker using activemq client

I used IBM MQs on my local machine to connect to a remote IBM MQ Queue Manager on a client machine for sending and receiving messages.
Due to some issues I need to uninstall IBM MQs on my end.
Can I connect to the client remote queue manager using Apache ActiveMQ? (With SSL)
If possible please guide me how to proceed with it.
If not please suggest any alternative solutions to connect.
No. Connect to it using the WebSphere MQ Client. It is freely downloadable as SupportPac MQC75 and includes support for several languages, including C and Java. Rather than just grabbing the jar files, please install the entire client distribution. IBM includes a number of diagnostic utilities, tracing and so forth in that distribution. These make debugging much easier and IBM requires them to be installed if you open a support ticket. Since the client is free, requiring the diagnostic tools to be installed seems reasonable.
The documentation for the client is here.
Active MQ uses a different wire protocol and its client won't work with WebSphere MQ.

AMQ9504: A protocol error was detected for channel

I'm unable to connect remotely from WebSphere Application Server with Queue Manager at WebSphere MQ. Anyhow it get connected to Queue Manager from WAS that is installed on same machine. I'm using version 7.5 of WebSphere MQ and version 7.0 of WebSphere Application Server.
While attempting to connect WAS remotely to Queue Manager following error messages were logged.
Error Message from WebSphere MQ:
1/30/2013 21:12:09 - Process(3624.6) User(MUSR_MQADMIN)
Program(amqrmppa.exe)
Host(KHILT-269) Installation(Installation1)
VRMF(7.5.0.0) QMgr(QM.TEST)
AMQ9504: A protocol error was detected for channel 'TEST_CHANNEL'. EXPLANATION: During communications with the
remote queue manager, the channel program detected a protocol error.
The failure type was 11 with associated data of 0. ACTION: Contact the
systems administrator who should examine the error logs to determine
the cause of the failure.
Error Message at WebSphere Application Server:
A connection could not be made to WebSphere MQ for the following
reason: CC=2;RC=2009
As it can be seen from logs, I have created Queue Manager as QM.TEST and channel as TEST_CHANNEL. The listener port defined for the Queue Manager is 1417 along with protocol TCP.
I did lot of google but didn't find any appropriate solution. I appreciate any help in this regard.
Thanks in adv, KAmeer
I had a similar issue where I have WAS 7 and WMQ 7.5. I was able to make a connection to my existing WMQ 7.0 QM but not my new WMQ 7.5 QM. Apparently there was a change to the WMQ components bundled with WAS 7 after the initial release 7.0.0.0. After updating the resource adapter I was able to make a successfull connection to both queue managers.
The queue manager generates protocol error and terminates the connection immediately when it receives unexpected TSH flow from the client. As a result the client receives 2009 error. Technically, low level MQ client will be able communicate with higher version MQ queue manager and vice versa unless there are known restrictions and/or there is a MQ defect/APAR. The error message indicates the queue manager is running at MQ 7500 and this is MQ base 7.5 version. It is recommended upgrading the queue manager to the latest fixpack available to rule out any known problems. You could also try disabling shared conversion on the SVRCONN(i.e. setting SHARECNV to 0) channel and check whether it workarounds the problem until the problem is resolved.
Open a PMR with IBM as this sounds like a bug.
the cause for this is mq 7 client cannot talk to mq 7.5, the client needs to use mq 7.5 jar files
I had this problem. In my case was the mq library that was doing an MQGET with an infinite loop, so the lib was locked on the mqget while i called the kill and generated an event and tried to disconnect while the get was still running. As the mqget does not support unlocking via signal, i had to change the code to not stay infinite on get and add some flags on the kill command so the app could detect that it was time to die, when it returned from the get.

Resources