# 查询对应容器的 ID $ docker ps -a # 进入容器环境 $ docker exec -it 74541aaf314f /bin/bash
# 向队列中插入数据 $ bin/activemq producer --message 123123 --messageCount 1 --destination queue://queuename INFO: Loading '/opt/activemq//bin/env' INFO: Using java '/usr/bin/java' Java Runtime: Oracle Corporation 1.8.0_91 /usr/lib/jvm/java-8-openjdk-amd64/jre Heap sizes: current=62976k free=62320k max=932352k JVM args: -Xms64M -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/opt/activemq/conf.tmp/login.config -Dactivemq.classpath=/opt/activemq/conf.tmp:/opt/activemq//../lib/: -Dactivemq.home=/opt/activemq/ -Dactivemq.base=/opt/activemq/ -Dactivemq.conf=/opt/activemq/conf.tmp -Dactivemq.data=/data/activemq Extensions classpath: [/opt/activemq/lib,/opt/activemq/lib/camel,/opt/activemq/lib/optional,/opt/activemq/lib/web,/opt/activemq/lib/extra] ACTIVEMQ_HOME: /opt/activemq ACTIVEMQ_BASE: /opt/activemq ACTIVEMQ_CONF: /opt/activemq/conf.tmp ACTIVEMQ_DATA: /data/activemq INFO: Unrecognized option: --mesage INFO | Connecting to URL: failover://tcp://localhost:61616 (null:null) INFO | Producing messages to queue://testqueue INFO | Using persistent messages INFO | Sleeping between sends 0 ms INFO | Running 1 parallel threads INFO | Successfully connected to tcp://localhost:61616 INFO | producer-1 Started to calculate elapsed time ...
INFO | producer-1 Produced: 1 messages INFO | producer-1 Elapsed time in second : 0 s INFO | producer-1 Elapsed time in milli second : 15 milli seconds
<transportConnectors> <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --> <transportConnectorname="openwire"uri="tcp://0.0.0.0:61616?maximumConnections=1000&wireformat.maxFrameSize=104857600"/> <transportConnectorname="amqp"uri="amqp://0.0.0.0:5672?maximumConnections=1000&wireformat.maxFrameSize=104857600"/> <transportConnectorname="stomp"uri="stomp://0.0.0.0:61612?transport.closeAsync=false"/> <transportConnectorname="stomp+nio"uri="stomp+nio://0.0.0.0:61613?transport.closeAsync=false"/> </transportConnectors>