Red Hat Bugzilla – Bug 468713
Client API change: removed AckPolicy, added Subscription.
Last modified: 2013-10-23 19:09:25 EDT
Release note for API changes:
== Removed classes:
client::AckPolicy: Improved functionality is available on the new class client::Subscription.
== Modified classes:
- parameter type of setAcquireMode() and setAcceptMode() changed from bool to AcquireMode/AcceptMode enum types to clarify the meaning of the values.
- all settings for a subscription (flow control, acquire/accept mode, auto acknowledgement) can be passed to an individual subscribe() call in a SubscriptionSettings struct rather than setting them globally on the SubscriptionManager. The global settings are still provided for backward compatibility.
- SessionManager::subscribe() functions return a Subscription.
- SessionManager::findSubscriptions() finds a subscription by name.
== New classes:
client::SubscriptionSettings: Aggregates all the settings (flow control, accept-acquire parameters and auto acknowledgement settings) a subscription
client::Subscription: Represents active subscription. Provides functions to
- Query settings for the subscription.
- Keep track of un-acquired or un-accepted messages
- Explicitly acquire and/or accept messages when auto-acknoweldgement is disabled.
Reasons for the changes:
- The use of bool for accept and acquire modes was confusing.
- Creating a SubscriptionSettings individual subscriptions is more flexible and less error prone than setting values on the SubscriptionSettings that apply to *all* subsequent subscriptions.
- AckPolicy only provided for control of accepting messages, not for acquiring them.
- AckPolicy was copied to each new subscription, there was no way to access the instance associated with a particular subscription.
- The concept of subscription is central to messaging, but the old API had no class to represent that concept. The Subscription class fills that gap.
*** Bug 471649 has been marked as a duplicate of this bug. ***