سؤال

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top