Chris
Chris

Reputation: 4774

optimizeAcknowledge vs DUPS_OK_ACKNOWLEDGE

Under the optimizeAcknowledge option on the ActiveMQ connection help page, it says this:

"Alternatively, you could use Session.DUPS_OK_ACKNOWLEDGE acknowledgement mode for the consumers which can often be faster."

I know both options allow you to send acknowledgements in batches, but are there any other differences?

Source: http://activemq.apache.org/connection-configuration-uri.html

Upvotes: 1

Views: 1948

Answers (1)

Tim Bish
Tim Bish

Reputation: 18356

The Session.DUPS_OK_ACKNOWLEDGE is a bit lazier than optimize ack mode but only when used with Topics, otherwise it doesn't have much effect unless optimize acknowledge is enabled. When used with a Queue Session.DUPS_OK_ACKNOWLEDGE reverts back to individual acks so its pretty much only worth using when you are consuming from a Topic.

The optimized ack mode will attempt to batch up acks when it can for any destination type and so long as you don't disable the "checkForDuplicates" option the message audit functionality will work to prevent duplicate deliveries that could occur when you use failover.

Upvotes: 2

Related Questions