Sap
Sap

Reputation: 5291

What are MQs and how are they different from webservices

I have recently started looking into MQs and I had some very basic questions,

  1. How to decide between web services and and MQ?

  2. Can MQs only send string messages or can it work with Java Objects as well

  3. Are there any constraints in terms of where the client and server reside? Or just like webseriveces the client/publisher can be anywhere and the server/receiver should reside on public network(assuming that it is a public WS )

Upvotes: 3

Views: 2913

Answers (2)

hakish
hakish

Reputation: 4048

Check out the link

http://en.wikipedia.org/wiki/IBM_WebSphere_MQ

for more detailed info. There is a similar question posted:

Message Queue vs. Web Services?

Found this useful as well: http://www.hanselman.com/blog/ClassicWebServicesVersusPOXXMLOverMQAreYouReallyUsingXML.aspx

Upvotes: 0

sethu
sethu

Reputation: 8411

  1. A message queue is mostly meant for asynchronous things where you dont have to wait for the response. You could block the caller until a response is sought, but thats typically what an MQ is not meant for. You would use it only in cases where a user is NOT waiting for an output. A webservice is the opposite. You get a request, process it and return it back in a finite time. The caller will mostly block until a response is received.
  2. You can send String, Objects , Maps, Byte Arrays to an MQ.
  3. There are no constraints regarding the placement of the MQs. Just like webservices they can be anywhere and you can write and read from the Queue.

Upvotes: 5

Related Questions