
import sys,os

import jpype

current_path = os.path.abspath(os.path.dirname(__file__))

jvmPath = jpype.getDefaultJVMPath()
# 加载jar包
jarpath = os.path.join(current_path,"ActiveMQInfo.jar")
print(jarpath)
jpype.startJVM(jvmPath, "-ea", "-Djava.class.path=%s" % jarpath, convertStrings=False)

Jclass = jpype.JClass('utils.QueueInfo')


def getAllQueueSize():
    return Jclass.getAllQueueSize()

def getQueueSize(queueName):
    return Jclass.getQueueSize(queueName)


if __name__ == '__main__':
    print(Jclass.getQueueSize("dataflow_attachment"))