How to send message headers (properties) for a message in active mq web console localhost:8161?

Activemq console can not be used in this case but you can use the curl command to send messages with header which exposes the api's of web console. Please refer below link:

ActiveMQ Rest

For example, using below command , uses the proerties "key=2dffvdfbfd"

curl -XPOST -d "body=Test message" -d "key=2dffvdfbfd" http://admin:admin@<brokerIp>:8161

You cannot, the console provides very limited message send facilities. If you want to send full blown messages then use a JMS client.


Web console does not allow to send custom jms header or properties.

So, you need to use the rest api:

http://activemq.apache.org/rest.html

The following curl worked for me:

  • activemq 5.14.x
  • queue name = avenger_tasks
  • body message = {'a': 'b'}
  • jms header name = JMSCorrelationID
  • jms header value = 9999
    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

Or with user and password

    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