Transactional Queue Management 101
A transactional queue is a middleware system that asynchronously routes messages of one type to another between hosts that may or may not be connected at any given time. This means that he must also be able to save the message somewhere. Examples of such systems are MSMQ and IBM MQ
A transactional queue can also participate in a distributed transaction , and rollback can initiate deletion of messages. This means that the message will be guaranteed to be delivered with maximum semantics or guaranteed delivery, if not rollback. A message will not be delivered if:
Host A sends a message, but Host B is not connected
Something (possibly, but not necessarily triggered from Host A) transaction rollback
B connects after the transaction rollback
In this case, B will never know that the message even exists if it is not informed with any other medium. If the transaction was canceled, it probably doesn't matter. If B connects and collects the message before the transaction is rolled back, rollback also cancels the message's effects on B.
Please note that A can send a message to the queue with a delivery guarantee at least once. If the transaction is complete, then Host A may assume that the message was delivered by a trusted vehicle. If the transaction is canceled, Host A may assume that any message effects have been canceled.
Web Services
A web service is a remote procedure call or other service (for example, the RESTFul API ) published (usually) by an HTTP server. This is a synchronous request / response protocol and does not have a delivery guarantee built into the protocol. The client must verify the correctness of the service. Usually this will be through a response to the request or call waiting time.
In the latter case, web services do not guarantee semantics at most once. The server may end the service and not give an answer (perhaps something goes wrong outside the server). The application should be able to cope with this situation.
IIRC, RESTFul services must be idempotent (the same state is achieved after any number of calls to the same service) , which is a strategy to address this drawback of guaranteed success / failure notification in the web service architecture. The idea is that, conceptually, one records the state, and does not call the service, so you can write as many times as you like. This means that the application can ignore the lack of feedback on success, as it can retry publishing until it receives a Success message from the server.
ConcernedOfTunbridgeWells Dec 30 '09 at 13:06 2008-12-30 13:06
source share