答案 0 :(得分:2)
在这种情况下无法使用Activemq控制台,但您可以使用curl命令发送带有标题的消息,该标题公开了Web控制台的API。请参考以下链接:
例如,使用下面的命令,使用proerties" key = 2dffvdfbfd"
curl -XPOST -d "body=Test message" -d "key=2dffvdfbfd" http://admin:admin@<brokerIp>:8161
答案 1 :(得分:1)
Web控制台不允许发送自定义的jms标头或属性。
因此,您需要使用其余的api:
http://activemq.apache.org/rest.html
以下卷曲对我有用:
{'a': 'b'}
curl -H 'Authorization: Basic YWabcdefg==' \
-d "body={'a': 'b'}" \
-d "JMSCorrelationID=9999" \
-d "JMSReplyTo=NickFury" \
-d "SomeProperty=SomeValue" \
http://localhost:8161/api/message/avenger_tasks?type=queue
或者使用用户名和密码
curl -u admin:admin \
-d "body={'a': 'b'}" \
-d "JMSCorrelationID=9999" \
-d "JMSReplyTo=NickFury" \
-d "SomeProperty=SomeValue" \
http://localhost:8161/api/message/avenger_tasks?type=queue
答案 2 :(得分:0)
你不能,控制台提供非常有限的消息发送设施。如果要发送完整的消息,请使用JMS客户端。
答案 3 :(得分:0)
您可以使用JMSToolBox
等应用程序