Do both receiving and sending end need to setup IBM MQ? - queue

My application only reads messages from the IBM MQ. I am trying to understand, if one of the end is only reading messages from queue, do both sending and receiving ends need to setup JMS provider(IBM MQ)/Connection factories, Queue destination?What is the difference between JMS provide and Queue manager? Who needs to install JMS provider and Queue manager?

You can think of the queue manager as the server where queues and other MQ objects live. Your application is the client that connects to the server and interacts with the objects there.
IBM MQ server/queue manager IS your JMS provider. Your client application needs the IBM MQ implemented JMS libraries (IBM MQ Classes for JMS) and the JMS api which you can then use in your application to add parameters to your connection factory to connect to the queue manager.
You can see a basic tutorial for a JMS MQ client application here.
Depending on who is in charge of your queue manager and how they have set things up, you should probably not be hard coding the queue manager and queue details in your client application. You should be getting the connection details from the JNDI store if you have an administrator who has set one up for you. See more at the bottom of the JMS tutorial I linked to, for how JMS works.

Related

Weblogic to JBoss JNDI - JMS queue Consumer and Publisher

I am working on an example where a JMS queue is hosted on a JBoss EAP 6 instance (one for Request and another for Response). I also have an application running on a Weblogic managed server.
I would like to setup a mechanism that allows applications running on Weblogic to be able to consume messages that are added on the Request queue hosted on JBoss. Also the applications should be able to publish messages to the Request queue (also hosted on JBoss)
I read about Foreign JNDI Providers in Oracle Documentation, and most of the examples I find are Weblogic to Remote Weblogic connections and Weblogic to Remote LDAP. My concern is around the difference in in the implementations on javax.naming.InitialContext for Weblogic and JBoss (whether it would be compatible).
Does anyone have any suggestions on this?
Neither the JNDI implementation nor the JMS implementation from JBoss EAP will be compatible with Weblogic. However, that shouldn't be a problem as both can be used by the same application given the right configuration.
Consider a standalone JMS application that consume a message from JMS provider X and sends a message to JMS provider Y. It would first use the JNDI implementation from JMX provider X to lookup the JMS connection factory and queue. That lookup would return the proper JMS implementation objects from provider X. The application would use those objects to consume a message from the queue. Then it would use the JNDI implementation from JMX provider Y to lookup the second JMS connection factory and queue. That lookup would return the proper JMS implementation objects from provider Y. As long as the JNDI InitialContext properties are all correct for each of the lookups and all the implementation classes are on the the application's classpath then everything will work without issue.
The situation in Weblogic is similar. You simply need to configure the foreign JNDI provider with the right properties, put the right implementation classes on the classpath, and then use all the right names in your JNDI lookups.

MSMQ with transactional support and Transport security

I am looking for a working reference sample MSMQ remote receive and remote send with transactional support and transport level security.
I have looked into Microsoft documentation and it talks about Message Encryption in theory but I couldn't see a sample.
I knew about WCF implementation however it does only MSMQ as a transit during client to server whereas I am looking for a console client to push a message from a server and later the message could be received by some other client from another server.
Thanks in Advance.

Is middleware needed for a REST service to be consumed?

There is an external web-service (REST based) which provides logistics service. In order to consume it from our application (which is java stack), I created a client library (using jersey and jackson, which is a self-contained jar file, and gives simple getters and setters to work with). All that is needed to consume this REST service is this jar file (which is being used as re-usable asset).
However, one of our clients asked, "since we already have ESB (a middleware from IBM) for our existing integrations, why can we not have this integration also through ESB ?"
Is it possible to consume the REST based service using a middleware such as ESB(or MQ) ? If so, how ?
Will it be wise to do it ?
What arguments can I posit to my client to tell them this may not work ?
Thanks.
Is it possible to consume the REST based service using a middleware such as ESB(or MQ) ? If so, how ? -
Yes. Every ESB has its syntax/APIs. Should not be difficult to understand if you are already working with REST/http requests. Note, MQ is a message broker that will allow asynchronous communication. For example, the application that wants to consume the REST service can send a message to the broker and not wait for a response from the external service. The message broker in turn can talk REST to the external service. The message broker might expose a REST interface to consume messages. But it all depends on the use case. You may want to call REST service synchronously.
Most ESBs support calling external web services REST/SOAP. So an ESB does not necessarily mean MQ.
Will it be wise to do it ?
It depends. Many organizations set up ESB/Gateway as a policy and to route/filter/govern all external routings. Also to manage load, HA etc.
What arguments can I posit to my client to tell them this may not work ?
It will most certainly work. You should assess if using an ESB is an overhead based on your requirements.

Can I invocate a route in Fuse ESB and wait for a reply?

Can I invocate a route in Fuse ESB from my application (maybe by using Exchange Send) and then have my application class wait for and receive a reply from Fuse ESB, after the route has done its job?
Yes, this is the request/reply EIP pattern: http://camel.apache.org/request-reply.html
You can send a message to Camel from Java code using the ProducerTemplate API: http://camel.apache.org/producertemplate.html
And it has methods that support the request/reply pattern, which are methods typically named with request.
When you do this, then the producer template will wait for the reply message automatic.

Apache CXF: Publishing a Web Service (SOAP over JMS) with failover feature

Apache CXF: It seems that failover feature is available, but for clients. I need to create a service that is binded to a JMS queue of a particular JMS server. The JMS provider(TIBCO) has capability of failing over. Is there a way in which I can allow my service to failover to another JMS server at runtime and publish it there? If cxf is not capable of doing this, is there any other framework which allows failover feature for publishing services over JMS?
Vidish,
Server :
The TIBCO EMS administrator needs to configure the FT connection factory and provide the connection factory name and URL details to you. Configure those details in your JMS configurations - that's all needed for server.
Client :
TIBCO JMS API provides failover mechanism. Sample code is available in TIBCO EMS installation folder.
Joy