activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Mittler" <>
Subject Re: Need help to enable a JMS MDB to receive messages from a STOMP publi
Date Tue, 23 May 2006 20:03:23 GMT
comments/questions inline ...

On 5/23/06, Charlesliu <> wrote:
> Thank you for the responses:
> For the Broker, I use the latest version of activemq as the following:
> (1)The broker is running with default configuration as "activemq.xml".
> (2) For the JMS clients, I first test those examples inside the folder of
> "/opt/incubator-activemq-4.0/example":
> start "ant consumer" in one terminal,
> start "ant producer" in another terminal,
> Both consumer and producer, using default build.xml for compilation and
> running, testing is successful. Both JMS clients listen on TCP:61616
> I modified build.xml to make JMS consumer and producer listen on a topic
> or
> a queue, both work successfully.
> (3) For CMS-STOMP, I used the package from the following:
> I compiled and tested the default "main.cpp" inside the "cms\test" folder,
> it was successful. Then, I split "main.cpp" into one STOMP subscriber and
> one STOMP producer, and test both of them against above ActiveMQ. The
> testing was successful too.
> Both STOMP subscriber and STOMP publisher listens on TCP:61613.
> (4) Then, I tried to make a JMS consumer receive messages from a STOMP
> publisher on either TCP:61616 or TCP:61613, the test was NOT successful,
> the
> JMS consumer receives nothing.

Just to be clear, your JMS consumer should be connected on 61616 (the
default openwire port) and you're stomp publisher should be talking to 61613
(the default stomp port).  Also, CMS only works with topics right now - so
for that test, the producer and consumer have to use a topic.  I have
verified that you can send text messages in both directions (JMS->CMS and
CMS->JMS) with older releases (not sure if I've tried with 4.x).

Something to keep in mind as well ... when sending text messages JMS->CMS
with the 3.x version of ActiveMQ, I had to add a property to the message's
property map before sending.  It seems that ActiveMQ used to (and may still)
expect that this map was non-null - and if it wasn't AMQ would blow chunks
with a NPE trying to access the null map.  So to get around it, I would have
the JMS publisher add a dummy boolean "x" property to the message before
sending - this seemed to fix it and my CMS (stomp) consumer would receive
the message.

At first, the JMS consumer listened on a "queue", then, I changed the
> "build.xml" to make the JMS consumer listen on a topic. Under these two
> scenarios, the JMS consumer cannot receive any message published by the
> STOMP publisher.
> Any suggestions from you would be highly appreciated.
> --
> View this message in context:
> Sent from the ActiveMQ - User forum at

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