How does a consumer acknowledge a message from a producer?

Jerry Smith

The easiest way is to allow the framework to do it--automatic acknowledgment:

  ...
  topicCon.createTopicSession(false, AUTO_ACKNOWLEDGE);
  ...

With client acknowledgment, a client can allow messages to accumulate until some arbitrary application condition:

  ...
  topicCon.createTopicSession(false, CLIENT_ACKNOWLEDGE);
  ...

When a client acknowledges a message, the acknowledged message and all "older" messages become unavailable for future processing.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact