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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:27:58+00:00 2026-05-25T20:27:58+00:00

I am trying to figure out how to do syncronous messaging using stomp with

  • 0

I am trying to figure out how to do syncronous messaging using stomp with hornetq, or if its even possible. I have an async stomp client working, but I can’t see how I would implement a sync version.

On the server side, my acceptor looks like this:

<acceptor name="stomp-acceptor">
  <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>        
  <param key="protocol" value="stomp" />
  <param key="port" value="61613" />
</acceptor>

and my listener looks like this:

public class SimpleSyncListener extends BaseListener implements SessionAwareMessageListener<Message> {

@Override
public void onMessage(Message message, Session session) throws JMSException {
    String lastMessage = "";

    try {
        lastMessage = ((TextMessage) message).getText();

        //System.out.println("server recieved: " + lastMessage);

        Destination replyDestination = message.getJMSReplyTo();

        StringBuffer sb = new StringBuffer();
        sb.append("reply ");
        sb.append(Calendar.getInstance().getTimeInMillis());
        sb.append(" ");
        sb.append(lastMessage);
        TextMessage replyMessage = session.createTextMessage(sb.toString());
        replyMessage.setJMSCorrelationID(message.getJMSMessageID());

        MessageProducer replyProducer = session.createProducer(replyDestination);

        replyProducer.send(replyMessage);

    } catch (JMSException e) {
        throw new RuntimeException(e);
    }
    incrementCount();

}

I assume I need to put something in the temp queue and send it back like you do with JMS. Its just not clear to me how that works with STOMP. Do i need to open another tcp connection back on the client side that correspond to the “temp queue” on the server side?

  • 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-05-25T20:27:59+00:00Added an answer on May 25, 2026 at 8:27 pm

    Stomp is a simple protocol, and on this case I don’t think you can have a multiplexed channel. So you will probably need a Stream to send, and a Stream to receive.

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

Sidebar

Related Questions

Trying to figure out why my code isn't working. Basically I have an elseif
I've been trying figure out how to add a handler to a method using
Trying to figure out the best way to have a templated brochure that creates
Trying to figure out the best way to accomplish this. I have inhereted a
im trying to figure out how i can do this. i have a list
Trying to figure out the MVC-concept. I have a NSCustomView that implements drawRect:, which
Just trying to figure out what others are using to test their database procedures
Trying to figure out how to convert how to covert 5 variables I have
I'm using Eclipselink and I'm trying figure out the best way to create a
Trying to figure out how to do this. I have the style but I'd

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.