Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9116295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:38:17+00:00 2026-06-17T04:38:17+00:00

Has anyone had any luck scripting inserts of ActiveMQ topics using, say, curl? I’m

  • 0

Has anyone had any luck scripting inserts of ActiveMQ topics using, say, curl?
I’m trying something like this

curl -d "JMSDestination=COMMON_TOPIC&JMSDestinationType=topic&JMSMessageCount=1&JMSText={\"name\":\"values-etc\"}}" http://localhost:8161/admin/sendMessage.action

I get back HTTP 500 NullPointerException which looks like AMQ-2740

java.lang.NullPointerException
at org.apache.activemq.web.handler.BindingBeanNameUrlHandlerMapping.getHandlerInternal(BindingBeanNameUrlHandlerMapping.java:57)

Looks like the problem is generating a secret key and the re-sending it, which is where I get lost. Anyone had luck with this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:38:19+00:00Added an answer on June 17, 2026 at 4:38 am

    This will work for BASIC HTTP authentication and ActiveMQ 5.4.2.

    As you said, you must include the secret key, as well as maintaining your java session.
    Let’s get the secret key in a SECRET variable and save cookies file (for JSESSIONID).

    SECRET=`curl --silent -H "Authorization: Basic YWRtaW46c29tZXBhc3N3b3Jk" -c cookies "http://127.0.0.1:6500/admin/send.jsp?JMSDestination=$DESTINATION&JMSDestinationType=$DESTINATION_TYPE" | sed -n '/secret/s/.*name="secret"\s\+value="\([^"]\+\).*/\1/p'`
    

    The Authorization header contains a hash of your credentials, you can sniff yours within the actual web console and a web development tool (F12 in chome).

    Send your message by reusing cookies and SECRET

    curl --silent -H "Authorization: Basic YWRtaW46c29tZXBhc3N3b3Jk" -b cookies --data "secret=${SECRET}&JMSDestination=${DESTINATION}&JMSDestinationType=${DESTINATION_TYPE}&JMSText=${MESSAGE}"
    

    Please note that 5.8 has a RESTful api that should be priviliged.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone had any luck using a UIPicker in the 3.2 SDK? I'm in
Has anyone had any luck model binding two or more collections using the code
Has anyone had any luck with compiling 64-bit Python extension modules for Windows using
Has anyone had any luck using Blend for Visual Studio 2011 Beta to create
Has anyone had any luck of using Oracle from .Net on a 64 bit
Has anyone had any luck using ColdFusion as a way to collect data via
Has anyone had any luck rolling a custom GWT jar for Google Collections /
Has anyone had any experiences developing large Java applications using GNU gettext for internationalization?
Has anyone had any experience using Adobe Air to create BitTorrent application? Is there
Has anyone had any experience of talking between an iSeries (using IBM's Websphere MQ)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.