IBM Websphere 8.5 - Consume messages from a Local Queue - ibm-mq

I have my application running on WAS 8.5 which consumes messages from IBM MQ. However, I want to test some functionality of my application by posting some messages to the MQ. I am trying to consume messages by creating a queue in my local setup & configuring the queue in WAS 8.5.
I have installed IBM MQ Explorer 9 in my system and created a queue manager & a queue as well. Attached below screenshot from MQ Explorer.
I am trying to have the TEST_QM & TEST_Q1 configured in the WAS 8.5 admin console under Queue connection factories.
Queue Manager Configuration in WAS
Host & port configuration in WAS
However, when I try the connection test in WAS, it returns me the below error.
I am a newbie to WAS, MQ & IBM world. Kindly guide as to where am I going wrong & how can my application consume messages from local queue?
Thank you!

Related

Unable to send message to IBM MQ

We are facing strange problem in our application. We are having three applications, say application A, application B and application C. Application A is a J2EE application deployed in JBoss EAP 7.2.0 which sends a message to ActiveMQ Artemis queue created in the same JBoss server. Application B is a middle-ware application written using Apache Camel which reads the message (which application A sent) from ActiveMQ Artemis queue, does some transformation and sends to a IBM MQ from which application C reads the message.
My issue is when the message is sent by Application A,the message is getting transformed correctly in application B but not sent to the IBM MQ, but when I am sending the same message to ActiveMQ Artemis queue (to which application A sends) using a demo client from my local environment, it is transformed and sent to IBM MQ and application C also picks that up successfully.
Can anyone give some idea why the message is not sent to IBM MQ when sent from application A? Is there some header which can prevent the message to be sent? Thanks in advance.

How to implement FIFO paradigm with Open Liberty and IBM MQ?

We are migrating applications from WebSphere Application Server Full profile (WAS) to Open liberty (OL)
One of the pattern we have is to consume a Queue in "strict FIFO order" for some JMS Queue. Many occurrences of the application are running concurrently ("cluster members" in WAS, "pods" in kubernetes/statefulset/docker for OL).
To implement FIFO, one and only one "JMS Activation" process/MDB can consume the Queue and if an exception occurs, stop the listener (JMS Activation)
In WAS, we can do this by
setting"WAS_EndpointInitialState"to"ACTIVE"on the JMS Activation for one server and"INACTIVE"for the others
set"Maximum server sessions"to 1 on the JMS Activation
check"Stop endpoint if message delivery fails"
monitor the logs to see if the activations stopped
In OL we can in"server.xml":
set"autoStart="true"on the"jmsActivationSpec" stanza for one of the process and "false"for the others
set"maxEndpoints="1"on the"jmsActivationSpec"
But how to make the activation stop in case of the application throw an exception in the"onMessage"method in the MDB?
[EDIT 1 After #JoshMc comment]
Currently, the message is moved to the DLQ and the activation never seem to stop, so FIFO is broken as the next message in the Queue is consumed...
Currently, when the "onMessage()"method throws an exception, the message is put back on the Queue, and immediately reprocessed, endlessly
The setting in"server.xml" to connect to IBM MQ from OL is done as decribed here
[EDIT 2]
This feature (stop the activation in case of failure) is implemented in IBM MQ rar v9.1.1 and WebSphere Liberty 18.0.0.4 by setting the "maxSequentialDeliveryFailures" property on the activation spec in this RFE. It does not work on Open Liberty v19.0.0.2 and IBM MQ rar v9.1.1. The rar specifically targets WebSphere Liberty to apply the property as cofirmed after activating traces on the connector:
March 7, 2019 1:17:38 EST PM[Default Executor-thread-7] ResourceAdapterImpl
WMQ messaging : '9.1.1.0-p911-L181120.1'.
MQJCA5003: 'maxSequentialFailureCount' cannot be set outside Websphere Liberty Profile
So the question is still there: How to make the activation stop in case of the"onMessage"method in the MDB fails to consume the message? Open a RFE to IBM MQ asking to port the feature to Open Liberty?

Can IBM Websphere MQ client be used without installing

I want to use IBM Websphere MQ client v7.5. I am writing standalone JMS client application to send and consume messages from the IBM WebsphereMQ server(which is running somewhere else but I have authority to send/receive messages)
I followed steps below:
Installed Websphere MQ client(Free version for 6 months) and did all basic installation.
I copied required Jar to other location/host and wrote a sample JMS application to send/receive messages. I am able to communicate to with the server.
My questions is : Can I use these Jars independently on any host(even in production) for life long or I should buy proper licence, install the client and then use those JARs ?
Thanks,
Anuj
MQ v8.0.0.4 provides exactly what you want. See here: http://www-01.ibm.com/support/docview.wss?uid=swg21969244. Look for IBM MQ JMS and Java 'All Client'. Client is free but whoever runs the queue manager must have appropriate licenses.

Configuration of WebMethods Client to connect to WebSphere JMS (not WebSphere MQ)

Currently I have setup two queues on WebSphere 7. One for sending and one for recieving messages.
I have configured a activation spec on the receiving queue and the messages are consumed fine by a Message Bean.
Also I have written a client that can run on a separate jvm which can send messages fine to the queue.
I am sure that the queues work.
Now I want to know how can I connect them with WebMetods. I know that WebMethods supports JBoss and WebLogic but no support for WebSphere.
I should be able to get this working just by providing:
a provider url - "iiop://172.17.13.65:2809"
a connection factory - "jms/ConnectionFactroy"
a queue name- "jms/inQueue"
and an initial context - "com.ibm.websphere.naming.WsnInitialContextFactory"
(at least this is what my client is using)
Is there anybody that has resolved this issue? And what are the steps they took?
Thank you in advance for your help.
We were able to get this implementation happen.
To solve this Web Methods had to import some jar files for Client JMS:
com.ibm.ws.ejb.thinclient_7.0.0 + com.ibm.ws.orb_7.0.0 + com.ibm.ws.sib.client.thin.jms_7.0.0
And use a bootstrap of this type PROVIDER_URL: "iiop://natasha:2810"
Alaso these details as previously mentioned:
a factory - "jms/ConnectionFactroy"
a queue name- "jms/inQueue" and
an initial context - "com.ibm.websphere.naming.WsnInitialContextFactory"

WebSphere MQ integration with WebLogic - issue sending messages to foreign queue

I'm testing a WebLogic MDB (running on my local Windows dev environment - Eclipse/WebLogic 10.3.2) with WebSphere MQ 6.0.1.0 (running on a Linux server). The WebSphere MQ components have been previously configured and I have the correct .bindings file.
I have followed the instructions described here.
I have no problem consuming messages that are placed on the MQ queue. However, when I attempt to configure the MDB to put messages back to the MQ queue I get the following warning upon server start-up:
<Warning> <JMSPool> <BEA-169808> <There was an error while making the initial
connection to the JMS resource named jms/WLSenderQCF from the EJB "TestMDB"
inside application "EJB Test 2EAR". The server will attempt the connection
again later. The error was javax.jms.JMSException: MQJMS1068: failed to obtain
XAResource>
If I place a message on the queue, my MDB consumes the messages, but these exceptions are thrown when the MDB attempts to put the message to the MQ Queue:
javax.jms.JMSException: MQJMS1068: failed to obtain XAResource...
javax.transaction.xa.XAException: client connection not XA enabled...
java.lang.NullPointerException
Anyone run into this and knows what the problem is?
Thanks for any help.
One issue seems to be the version of MQ you're using. It is ancient. IBM took MQ 6 out of support quite a while ago (Sept '12! http://www-01.ibm.com/support/docview.wss?uid=swg21584325).
Things got a lot easier when IBM decided to include the extended transactional client in the product for free: http://www-01.ibm.com/support/docview.wss?uid=swg21584325
So one option might be to upgrade to a version which includes this out of the box:
7.0.1.12+
7.1.0.5+
7.5
8.0
Otherwise... look into the v6 documentation on how to enable the 'extended transactional client' for JMS assuming you paid for it.

Resources