Hi, In one of the mock question at javacoding.com I saw an answer for a question as Point-to-Point messaging system can be used both Synchronous / Asynchronous messaging? Is it right? I think Point-to-Point messaging system is only for Synchronous ...right? any one please share your ideas about this.. Thanks,
George Thomson<br />SCJP, SCWCD, SCBCD, IBM-141(XML), SCEA<br />......................................................................
No, you can definitely do asynchronous point to point messaging. In fact, the entire point of "messaging" is that it's inherently asynchronous. Client "A" sends a message to Queue "whatever", and returns immediately in a messaging architecture, as opposed to making a blocking method call. The process that picks up the message from the Queue doesn't even to be running when the message was sent! A process / job can come in later, and pull everything from the Queue and process it... you can't get much more asynchronous than that. And on the receive side, you have (using JMS as an example) the option of doing asynchronous receiving (calling a blocking receive() method) or using asynchronous receive, by implementing interface MessageListener and using the onMessage() method. [ January 23, 2004: Message edited by: Phil Rhodes ]
A+, Network+, SCJP, SCWCD<br />preparing for SCBCD, SCEA, CompTIA I-Net+
Joined: Dec 27, 2003
Anybody who's interested in digging more deeply into JMS / Messaging here are a couple of good books to check out: Enterprise JMS Shuan Terry M&T Books ISBN: 0-7645-4897-2 Professional JMS Programming Paul Giotta, Scott Grant, et al. WROX Press ISBN: 1-861004-93-1 Java Message Service API Tutorial and Reference: Messaging for the J2EE Platform Mark Hapner, Rich Burridge, et al. Addison-Wesley ISBN: 0-201-78472-6 Java Message Service (JMS) for J2EE Levent Erdogan New Riders Press ISBN: 0-73571-255-7 Java Message Service Richard Monson-Haefel, David A. Chappell O'Reilly & Associates ISBN: 0-596-00068-5
Joined: Jul 09, 2003
Phil, Thank you very much for your answer with explanation. Thanks,