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

The Archive Base Latest Questions

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

I am trying to setup a C client to talk to a hornetq jms

  • 0

I am trying to setup a C client to talk to a hornetq jms server. I am using its STOMP acceptor with libstomp on the C side.

My C client code is just this example from the libstomp page verbatim with the passphrase and destination queue name changed (to a valid queue that can be accessed from a java client).

Here’s what I get when I run it:

Connecting......OK
Sending connect message.OK
Reading Response.Response: CONNECTED,
OK
Sending Subscribe.OK
Sending Message.OK
Reading Response.Response: ERROR, org.hornetq.core.protocol.stomp.StompException:     Client must set destination or id head
er to a SUBSCRIBE command
        at     org.hornetq.core.protocol.stomp.StompProtocolManager.onSubscribe(StompProtocolManager.java:    339)
        at     org.hornetq.core.protocol.stomp.StompProtocolManager.handleBuffer(StompProtocolManager.java:196)
        at     org.hornetq.core.protocol.stomp.StompConnection.bufferReceived(StompConnection.java:279)
        at     org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferRec    eived(RemotingServ
iceImpl.java:512)
        at     org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHa    ndler.java:73)
        at     org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100)
        at     org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372)
        at     org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:367)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
        at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:100)
        at     org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
        at     org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
        at     org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorServic    e.java:181)
        at     java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at     java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
OK
Sending Disconnect.OK
Disconnecting...OK

In short – I get this exception from the server:

ERROR, org.hornetq.core.protocol.stomp.StompException: Client must set destination or id header to a SUBSCRIBE command

On line 92 of the example, we set the destination:

apr_hash_set(frame.headers, "destination", APR_HASH_KEY_STRING, "/queue/FOO.BAR");

Despite this, when the message gets to the server and it parses the headers, I get a map ation -> /queue/FOO.BAR, but it’s looking for a destination key. I have confirmed that the client is adding the correct map entry to the headers and it is not corrupted all the way through to sending it to the network.

Any pointers as to what might be wrong?

P.S. hornetq is 2.2.9.Final, libstomp is the latest revision from svn (rev 90 – http://svn.codehaus.org/stomp/trunk/c/), and it was compiled with apr 1.4.6; all running on Win-7

  • 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:24:56+00:00Added an answer on June 17, 2026 at 4:24 am

    2.2.9 is a pretty old HornetQ release. You should retry with 2.2.14, or with the latest 2.3.beta. I just looked at the code in git for HornetQ master, the destination is being handled

    See onSubscribe() at https://github.com/hornetq/hornetq/blob/master/hornetq-server/src/main/java/org/hornetq/core/protocol/stomp/VersionedStompFrameHandler.java#L254

    FWIW, in HornetQ a dot . is used as divisor for destinations (your code is using a slash /). The STOMP protocol leaves this as an implementation dependent convention.

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

Sidebar

Related Questions

I am trying to setup a simple UDP client and server using Ruby. The
I am trying to setup a Bayeux server and client using Jetty, Dojo and
I was trying to setup remote jmeter server and jmeter client. Server public IP
Hello I am new to Git and trying to setup server part and client
I've Got two Programs (Server / Client) I'm trying to setup IPC for them
I'm trying to setup a RFCOMM client-server communication system between my PC and my
We have a WMQ - WAS/JMS client setup through server connection channels where we
I am trying to setup a basic ldap server/client scenario. I downloaded openldap for
I am trying to setup a wordpress xml-rpc with rails: blog = XMLRPC::Client.new(localhost/blog, /xmlrpc.php,
I am trying to setup two way communication between a daemon and a client

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.