activemq of what i have learned (run helloworld)
2007-06-08 16:38
525 查看
activeMQ -activemq of what i have learned (run helloworld)
1.download MQ zip from apache.org
2.install ant
3.do step by step following the buildguide.html
that will see the result (sending message) as :
subject $subject = TEST.FOO
[java] Connecting to URL: tcp://localhost:61616
[java] Publishing a Message with size 1000 to queue: TEST.FOO
[java] Using non-persistent messages
[java] Sleeping between publish 0 ms
[java] Sending message: Message: 0 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 1 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 2 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 3 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 4 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 5 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 6 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 7 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 8 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 9 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Done.
[java] connection {
[java] session {
[java] messageCount{ count: 10 unit: count startTime: 1176964890093 las
tSampleTime: 1176964890203 description: Number of messages exchanged }
[java] messageRateTime{ count: 10 maxTime: 31 minTime: 0 totalTime: 94
averageTime: 9.4 averageTimeExMinMax: 7.875 averagePerSecond: 106.38297872340425
averagePerSecondExMinMax: 126.98412698412699 unit: millis startTime: 1176964890
093 lastSampleTime: 1176964890203 description: Time taken to process a message (
thoughtput rate) }
[java] pendingMessageCount{ count: 0 unit: count startTime: 11769648900
93 lastSampleTime: 1176964890093 description: Number of pending messages }
[java] expiredMessageCount{ count: 0 unit: count startTime: 11769648900
93 lastSampleTime: 1176964890093 description: Number of expired messages }
[java] messageWaitTime{ count: 0 maxTime: 0 minTime: 0 totalTime: 0 ave
rageTime: 0.0 averageTimeExMinMax: 0.0 averagePerSecond: 0.0 averagePerSecondExM
inMax: 0.0 unit: millis startTime: 1176964890093 lastSampleTime: 1176964890093 d
escription: Time spent by a message before being delivered }
[java] durableSubscriptionCount{ count: 0 unit: count startTime: 117696
4890093 lastSampleTime: 1176964890093 description: The number of durable subscri
ptions }
[java]
[java] producers {
[java] producer queue://TEST.FOO {
[java] messageCount{ count: 10 unit: count startTime: 1176964890109
lastSampleTime: 1176964890203 description: Number of messages processed }
[java] messageRateTime{ count: 10 maxTime: 31 minTime: 0 totalTime:
94 averageTime: 9.4 averageTimeExMinMax: 7.875 averagePerSecond: 106.3829787234
0425 averagePerSecondExMinMax: 126.98412698412699 unit: millis startTime: 117696
4890109 lastSampleTime: 1176964890203 description: Time taken to process a messa
ge (thoughtput rate) }
[java] pendingMessageCount{ count: 0 unit: count startTime: 1176964
890109 lastSampleTime: 1176964890109 description: Number of pending messages }
[java] messageRateTime{ count: 10 maxTime: 31 minTime: 0 totalTime:
94 averageTime: 9.4 averageTimeExMinMax: 7.875 averagePerSecond: 106.3829787234
0425 averagePerSecondExMinMax: 126.98412698412699 unit: millis startTime: 117696
4890109 lastSampleTime: 1176964890203 description: Time taken to process a messa
ge (thoughtput rate) }
[java] expiredMessageCount{ count: 0 unit: count startTime: 1176964
890109 lastSampleTime: 1176964890109 description: Number of expired messages }
[java] messageWaitTime{ count: 0 maxTime: 0 minTime: 0 totalTime: 0
averageTime: 0.0 averageTimeExMinMax: 0.0 averagePerSecond: 0.0 averagePerSecon
dExMinMax: 0.0 unit: millis startTime: 1176964890109 lastSampleTime: 11769648901
09 description: Time spent by a message before being delivered }
[java] }
[java] }
[java] consumers {
[java] }
[java] }
[java] }
that will see the result (sending message) as :
consumer:
[echo] Running consumer against server at $url = tcp://localhost:61616 for
subject $subject = TEST.FOO
[java] Connecting to URL: tcp://localhost:61616
[java] Consuming queue: TEST.FOO
[java] Using a non-durable subscription
[java] We are about to wait until we consume: 10 message(s) then we will sh
utdown
[java] Received: Message: 0 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 1 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 2 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 3 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 4 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 5 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 6 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 7 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 8 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 9 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Closing connection
<!-- Spring JmsTemplate config -->
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory">
<!-- lets wrap in a pool to avoid creating a connection per send -->
<bean class="org.springframework.jms.connection.SingleConnectionFactory">
<property name="targetConnectionFactory">
<ref local="jmsConnectionFactory"/>
</property>
</bean>
</property>
<!-- custom MessageConverter define -->
<property name="messageConverter" ref="orderMessageConverter"/>
</bean>
调低占用内存
/home/activemq/bin/activemq 里面 搜索 512M
1.download MQ zip from apache.org
2.install ant
3.do step by step following the buildguide.html
that will see the result (sending message) as :
subject $subject = TEST.FOO
[java] Connecting to URL: tcp://localhost:61616
[java] Publishing a Message with size 1000 to queue: TEST.FOO
[java] Using non-persistent messages
[java] Sleeping between publish 0 ms
[java] Sending message: Message: 0 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 1 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 2 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 3 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 4 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 5 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 6 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 7 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 8 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Sending message: Message: 9 sent at: Thu Apr 19 14:41:30 CST 2007 .
..
[java] Done.
[java] connection {
[java] session {
[java] messageCount{ count: 10 unit: count startTime: 1176964890093 las
tSampleTime: 1176964890203 description: Number of messages exchanged }
[java] messageRateTime{ count: 10 maxTime: 31 minTime: 0 totalTime: 94
averageTime: 9.4 averageTimeExMinMax: 7.875 averagePerSecond: 106.38297872340425
averagePerSecondExMinMax: 126.98412698412699 unit: millis startTime: 1176964890
093 lastSampleTime: 1176964890203 description: Time taken to process a message (
thoughtput rate) }
[java] pendingMessageCount{ count: 0 unit: count startTime: 11769648900
93 lastSampleTime: 1176964890093 description: Number of pending messages }
[java] expiredMessageCount{ count: 0 unit: count startTime: 11769648900
93 lastSampleTime: 1176964890093 description: Number of expired messages }
[java] messageWaitTime{ count: 0 maxTime: 0 minTime: 0 totalTime: 0 ave
rageTime: 0.0 averageTimeExMinMax: 0.0 averagePerSecond: 0.0 averagePerSecondExM
inMax: 0.0 unit: millis startTime: 1176964890093 lastSampleTime: 1176964890093 d
escription: Time spent by a message before being delivered }
[java] durableSubscriptionCount{ count: 0 unit: count startTime: 117696
4890093 lastSampleTime: 1176964890093 description: The number of durable subscri
ptions }
[java]
[java] producers {
[java] producer queue://TEST.FOO {
[java] messageCount{ count: 10 unit: count startTime: 1176964890109
lastSampleTime: 1176964890203 description: Number of messages processed }
[java] messageRateTime{ count: 10 maxTime: 31 minTime: 0 totalTime:
94 averageTime: 9.4 averageTimeExMinMax: 7.875 averagePerSecond: 106.3829787234
0425 averagePerSecondExMinMax: 126.98412698412699 unit: millis startTime: 117696
4890109 lastSampleTime: 1176964890203 description: Time taken to process a messa
ge (thoughtput rate) }
[java] pendingMessageCount{ count: 0 unit: count startTime: 1176964
890109 lastSampleTime: 1176964890109 description: Number of pending messages }
[java] messageRateTime{ count: 10 maxTime: 31 minTime: 0 totalTime:
94 averageTime: 9.4 averageTimeExMinMax: 7.875 averagePerSecond: 106.3829787234
0425 averagePerSecondExMinMax: 126.98412698412699 unit: millis startTime: 117696
4890109 lastSampleTime: 1176964890203 description: Time taken to process a messa
ge (thoughtput rate) }
[java] expiredMessageCount{ count: 0 unit: count startTime: 1176964
890109 lastSampleTime: 1176964890109 description: Number of expired messages }
[java] messageWaitTime{ count: 0 maxTime: 0 minTime: 0 totalTime: 0
averageTime: 0.0 averageTimeExMinMax: 0.0 averagePerSecond: 0.0 averagePerSecon
dExMinMax: 0.0 unit: millis startTime: 1176964890109 lastSampleTime: 11769648901
09 description: Time spent by a message before being delivered }
[java] }
[java] }
[java] consumers {
[java] }
[java] }
[java] }
that will see the result (sending message) as :
consumer:
[echo] Running consumer against server at $url = tcp://localhost:61616 for
subject $subject = TEST.FOO
[java] Connecting to URL: tcp://localhost:61616
[java] Consuming queue: TEST.FOO
[java] Using a non-durable subscription
[java] We are about to wait until we consume: 10 message(s) then we will sh
utdown
[java] Received: Message: 0 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 1 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 2 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 3 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 4 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 5 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 6 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 7 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 8 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Received: Message: 9 sent at: Thu Apr 19 14:41:30 CST 2007 ...
[java] Closing connection
<!-- Spring JmsTemplate config -->
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory">
<!-- lets wrap in a pool to avoid creating a connection per send -->
<bean class="org.springframework.jms.connection.SingleConnectionFactory">
<property name="targetConnectionFactory">
<ref local="jmsConnectionFactory"/>
</property>
</bean>
</property>
<!-- custom MessageConverter define -->
<property name="messageConverter" ref="orderMessageConverter"/>
</bean>
调低占用内存
/home/activemq/bin/activemq 里面 搜索 512M
相关文章推荐
- Ten Years of Pedestrian Detection,What Have We Learned? 知识笔记
- 【计算机视觉】论文笔记:Ten years of pedestrian detection, what have we learned?
- 行人检测论文笔记:Ten Years of Pedestrian Detection, What Have We Learned?
- 论文笔记:Ten years of pedestrian detection, what have we learned?
- ActiveMQ HelloWorld入门
- Ten Years of Pedestrian Detection, What Have We Learned?
- 论文笔记:Ten years of pedestrian detection, what have we learned?
- ActiveMQ HelloWorld
- ActiveMQ Hello Word 简单应用例子编写
- Hello, JIT World: The Joy of Simple JITs
- simple use of ActiveMQ
- (转) Eclipse - Python - Installation of PyDev with a Python Hello World tutorial
- 【Hello Python World】Class Notes of Week 4
- The True Story of Hello World
- 名词王国里的死刑(翻译) A Story of Hello World
- The True Story of Hello World
- How to configure security of ActiveMQ ?
- Byte-of-python笔记代码1:helloworld.py
- Chapter 1 Hello, world of concurrency in C++!
- OpenRisc-11-编写ipcore 的linux driver,然后run helloworld