mirror of https://github.com/apache/activemq.git
AMQ-4831: Use long value for average message size on borker (JMX) like min/max values also is.
This commit is contained in:
parent
82fb18d0d1
commit
37eb6b0c6e
|
@ -163,8 +163,9 @@ public class BrokerView implements BrokerViewMBean {
|
|||
* @return the average size of a message (bytes)
|
||||
*/
|
||||
@Override
|
||||
public double getAverageMessageSize() {
|
||||
return safeGetBroker().getDestinationStatistics().getMessageSize().getAverageSize();
|
||||
public long getAverageMessageSize() {
|
||||
// we are okay with the size without decimals so cast to long
|
||||
return (long) safeGetBroker().getDestinationStatistics().getMessageSize().getAverageSize();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -100,7 +100,7 @@ public interface BrokerViewMBean extends Service {
|
|||
long getTotalMessageCount();
|
||||
|
||||
@MBeanInfo("Average message size on this broker")
|
||||
double getAverageMessageSize();
|
||||
long getAverageMessageSize();
|
||||
|
||||
@MBeanInfo("Max message size on this broker")
|
||||
public long getMaxMessageSize();
|
||||
|
|
Loading…
Reference in New Issue