3

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 )

2 Answers 2

5
  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.
1
  • 1
    Re: #2, you can actually send anything to an MQ broker. It's just a stream of bytes, so you can transmit anything that can be serialized into bytes (i.e. anything at all). Commented Jan 14, 2012 at 6:04
0

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

1
  • 3
    "MQ is a product of IBM" is not accurate, IBM has a MQ product, and many other vendors.
    – Jerry Tian
    Commented Jan 13, 2012 at 5:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.