IBM mq jms listener with batch - spring-boot

I use spring boot application with jms listener.
I want to know , how to config IBM MQ JMSListener to consume batch messages instead single message. It is real?

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.

Integration Wildfly appication server and Websphere MQ

I need to integrate Wildfly and Websphere MQ it means that I want send JMS message from Wildfly to Websphere MQ.
What is the best way to achieve this? Should I implement some client and sent these JMS messages directly or maybe there is similar method like JMS bridge?

Is It possible if i have put message to ActiveMq jms and consume it from RabbitMq jms?

I am new to jms,
I have did poc of spring jms with ActiveMq. In which I am producing messages in queue and consume it using consumer and one poc in which I am using spring jms with rabbitmq with producer and consumer and have added plugin of jms in rabbit mq to use spring jms with rabbitmq.
Is it Possible if I put Produce message in active MQ and Consume that messages using spring jms rabbitmq consumer?
Is It possible if yes then How?
Thanks in advance.
ActiveMQ and RabbitMQ are two different brokers - why do you need (and why do you think it's possible) to send messages to one broker and receive them from another?
You would need another application to move the messages; it's not clear why you would want to do that.
Typically, you would need an adapter layer to move the JMS messages from one MQ to another (i.e., active MQ to Rabbitmq etc.).
You can look here for some notes (IBM specific) on JMS adapters, but the underlying concept is the same i.e., consuming from one MQ and producing the messages to another MQ.

Spring JMS + WebSphere MQ client

I was trying to configure jms template to connect to WebSphere MQ. When using Websphere client jar, there are multiple options that were set like MQC.MQOO_OUTPUT | MQC.MQOO_FAIL_IF_QUIESCING etc for Queue's and PUT and GET options like MQC.MQPMO_NEW_MSG_ID , MQC.MQGMO_WAIT, MQC.MQMO_MATCH_CORREL_ID etc.,.,
is there way to pass these option to JMS template ?
These options are IBM MQ specific, so don't think they can be passed as it is to Spring. But some of these have a JMS equivalent available in Spring template.
MQC.MQOO_OUTPUT option means open queue for putting messages and is equivalent to JMS createProducer API.
MQC.MQGMO_WAIT option is equivalent to receive(timeout)
MQC.MQMO_MATCH_CORREL_ID - is equivalent to creating a consumer with a selector "JMSCorrelatoinID=<your correlationid>"

MDB deployed on JBOSS fetching messages from IBM MQ

I would like to deploy MDB on JBOSS. But the publisher will not send messages to the JBOSS AS, it is sending messages to IBM MQ.
Should I use JCA to integrate JBOSS and IBM MQ?
OR
Can the MDB on JBOSS AS subscribe to the topic on which IBM MQ is getting messages from publisher?
What are the advantages of one approach to another?
The recommended way to consume messages in JBoss from IBM MQ is via a Message Driven Bean (MDB). This is done by deploying the IBM JCA resource adapter (RA) in JBoss. You must use the IBM RA in JBoss as this rar file contains the IBM MQ client code that is needed for communicating with IBM MQ.
When using the MDB approach, the container (JBoss, in this case) works with the JCA to manage JMS connections, message delivery and transactions. This leaves you to only write the onMessage() method - quite a lot gets done for you under the hood.
Yes you can certainly have an MDB in JBoss that is subscribed to a Topic on MQ,
You should deploy the WebSphere MQ Resource Adapter (WMQRA) into JBoss and then configured the WMQ RA JCA resources in JBoss (Activation Specification, Queue/Topic). This will then let you deploy your MDB, and the JCA resources will handle the connection to the WMQ Queue Manager and Queue/Topic that your messages are on.
There are a few guides on setting up the WMQ RA in JBoss around on the internet.

Resources