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 7808133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:03:43+00:00 2026-06-02T03:03:43+00:00

I am trying send a message to an Active MQ topic using Perl’s Net::Stomp.

  • 0

I am trying send a message to an Active MQ topic using Perl’s Net::Stomp. On the other side a Java Client monitors the Topic and picks up the message from it. The Active MQ is based on Spring framework and I have the below defined in the Spring config.xml

<amq:transportConnectors>
        <amq:transportConnector name="openwire" uri="tcp://localhost:61616" />
        <amq:transportConnector name="stomp" uri="stomp://localhost:61613" />
</amq:transportConnectors>
<!--  ActiveMQ destinations to use for RTlog Messages -->
<amq:topic id="rTlogDest"  physicalName="RTlogTopic" name="RTlogTopic"/>

The messages sent from Perl are not being picked up by the Java client on the other side at all.The perl code looks like below. Is there any thing wrong in it?

use Net::Stomp;
my $stomp = Net::Stomp->new({hostname => 'localhost', port => '61613'});
$stomp->connect({login => 'admin', passcode => 'password'});

#$stomp->send({destination => 'RTlogTopic', body => 'test message'});

$frame = Net::Stomp::Frame->new(
      { command => 'SEND', 
        headers => { 'destination' => 'RTlogTopic',
                     'timestamp' => time
                   }, 
        body => 'test message' } );

$stomp->send_frame($frame);

$stomp->disconnect;

I have used the $stomp->send method too (commented out above), but it doesn’t work either. Then I read somewhere that STOMP needs the message to be framed and sent and hence I framed the message. The MQ Java listener works fine for messages coming into port 61616 though TCP (from other java clients), but I am not able to make it work for Perl through 61613 (multiple message producers). I googled and found that a lot of people have made it work on PHP to Java, but not a single example of Perl to Java. Is there a different way that the Stomp messages needs to be processed on the Java monitor side (consumer) or the usual onMessage implementation (like for TCP) should work?

  • 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-02T03:03:44+00:00Added an answer on June 2, 2026 at 3:03 am

    I achieved to send a message to Activemq queue (fyi, 5.3). Below you can check the code.

    First, check your destination name is ok in stomp-perl side, it should be something like ‘/topic/abc’ to send to Amq topic abc. See http://activemq.apache.org/stomp.html

    Also you can check your message is in your queue or was published into your topic by pointing a browser to: http://localhost:8161/admin or the host where your Amq is running.

    Hope this helps.

    Here it is the sample code:

    #!/usr/bin/perl
    use Net::Stomp;
    
    my $msg = "hello world\n";
    print $msg
    
    # send a message to the queue 'xyz'
    
    my $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61613' } );
    $stomp->connect( { login => 'hello', passcode => 'there' } );
    $stomp->send(
       { destination => '/queue/xyz', body => $msg } );
    $stomp->disconnect;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to send a message using The Sendsmsplugin for phone gap on Android.
I'm trying to send post using API feed. I set fields: message , link
I have been trying to send a big attachment (9 MB) using C# ASP.NET
I'm trying to send message using tibrvsend command. The scenarios is like below ,
I am trying to send an email via GMail from ASP.Net using the code
I'm trying to send a message by using Javamail API, with tomcat as a
I am trying to send message to selected facebook friends by using facebook' javascript
I am trying to send a message with attachment using CDO object. When the
I've been getting the following exception when trying to send an e-mail using System.Net.Mail:
I am trying to send a soap message to an external system, this system

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.