ack() method in nConsumeEvent together with queues. More detailed explanation needed

I need a better understanding of the ack() method found in the class nConsumeEvent?
What is it really doing? How does it relate to the method commit().
Can it be used together with queues?

Hello Lars,

What the ack() method is doing is sending a client request to acknowledge the event on the server. If the subscriber or iterator has a flag autoAck = true, this will be done automatically, in case you are using the JMS API this configuration is set when creating the session. When the client acknowledges the message he actually notifies the server that the message is received successfully and the server does not have to resend the message again. In case of a durable subscriber, if the session is disconnected and you have unacknowledged messages, you will receive them next time you are establishing a session. If you have a non durable subscriber it would not make any difference because the messages will be lost. If you do acknowledge the messages by yourself (e.g not auto acknowledge) you would have the ability to manage the size of the window with messages you can reach before acknowledging. On the other question - could this be used with queues. As far as I checked the client API the QueueReaders we have implemented are transacted, so here using commit would make sense instead of acknowledge. When you have opened a transacted session you should use commit() instead of ack(). Hope this helps. If you do have other questions, do not hesitate to ask.

Regards,
Filareta