/**
* @return the number of messages discarded due to being a slow consumer
*/
public int getDiscardedCount() {
TopicSubscription topicSubscription = getTopicSubscription();
return topicSubscription != null ? topicSubscription.discarded() : 0;
}
/**
* @return the maximun number of messages that can be pending.
*/