Does anyone know which JMS messages will be resent in CLIENT_ACKNOWLEDGE mode if the client works?

The spectrum says: "Recognizing a consumed message automatically confirms receipt of all messages that were delivered by its session," but I need to know what it means "delivered."

For example, if I call customer.receive () 6 times and then I call. The knowledge on the third message is (a) only the first 3 messages that are ack'd, or (b) all 6?

I really hope this is option a, i.e. messages after you called confirmation on WILL were re-added, otherwise it would be difficult to understand how you could prevent message loss if my receiver process failed before I could save and acknowledge messages. But the specification is worded so that it is not clear. I get the impression that the authors of the JMS specification considered a broker failure, but did not think too long about how to protect against client failure: o (

Thanks Ben

+3
source share
1 answer

According to the specification, option (b) is the correct behavior. If you get option (a) and rely on it, the application will not be portable.

JMS Version 1.1 12 2002 .

, , , . , , , .

, , . , , . Ack . , ack , , ack.

"" API, . , , , . , :

  • .
  • TCP , - .
  • GET .
  • -.
  • - TCP . , , JMS , . , , , .
  • .
  • .
  • - .

6 8, TCP . JMS 5. . . 4.4.13, :

, , , . , PERSISTENT .

JMS. .

, - , .

, " customer.receive() 6 , . 3- " , 4 6 , , ) , ) .

+4

Source: https://habr.com/ru/post/1748885/


All Articles