activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Beck <>
Subject libstomp C message being read without me reading it
Date Tue, 11 Jun 2013 18:53:43 GMT
I am using the C library libstomp to send a message to my broker. It sends
my message, but it also dequeues my message. I don't want it to do that.

I have removed my error checking to decrease verbosity.

Here is my setup for the connection:

apr_status_t rc;

rc = stomp_connect(&connection, "", 61613, p);

// connect frame
frame.command = "CONNECT";
frame.headers = NULL;
frame.body = NULL;
rc = stomp_write(connection, &frame, p);

// now subscribe
frame.command = "SUB";
frame.headers = apr_hash_make(p);
apr_hash_set(frame.headers, "destination", APR_HASH_KEY_STRING,
rc = stomp_write(connection, &frame, p);

Here is my message sending:

frame.command = "SEND";
// no need to setup headers for queue bc done in init
// allocate some mem for body
frame.body = apr_palloc(r->pool,filename_size);
strcpy(frame.body, filename);

apr_status_t rc;
rc = stomp_write(connection, &frame, r->pool);

I am not calling stomp_read anywhere so I am unsure as to why my message is
being dequeued as soon as it is enqueued.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message