You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Adrian Co <ac...@exist.com> on 2006/05/23 10:06:15 UTC

Re: Need help to enable a JMS MDB to receive messages from a STOMP publi

Hi,

I was wondering if you can post your broker config and the connection
factory you use to connect to the broker. :)

Regards,
Adrian Co
--
View this message in context: http://www.nabble.com/Need+help+to+enable+a+JMS+MDB+to+receive+messages+from+a+STOMP+publisher-t1664095.html#a4518653
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Need help to enable a JMS MDB to receive messages from a STOMP publi

Posted by Charlesliu <ch...@gmail.com>.
Nate, thank you, I will try it. 
--
View this message in context: http://www.nabble.com/Need+help+to+enable+a+JMS+MDB+to+receive+messages+from+a+STOMP+publisher-t1664095.html#a4559628
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Need help to enable a JMS MDB to receive messages from a STOMP publi

Posted by Nathan Mittler <na...@gmail.com>.
comments/questions inline ...

On 5/23/06, Charlesliu <ch...@gmail.com> wrote:
>
>
> Thank you for the responses:
>
> For the Broker, I use the latest version of activemq as the following:
>
> http://people.apache.org/~chirino/incubator-activemq-4.0/maven1/incubator-activemq/distributions/incubator-activemq-4.0.tar.gz
>
> (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:
> https://svn.apache.org/repos/asf/incubator/activemq/trunk/cms
>
> 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:
> http://www.nabble.com/Need+help+to+enable+a+JMS+MDB+to+receive+messages+from+a+STOMP+publisher-t1664095.html#a4525272
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>
Regards,
Nate

Re: Need help to enable a JMS MDB to receive messages from a STOMP publi

Posted by Charlesliu <ch...@gmail.com>.
Thank you for the responses:

For the Broker, I use the latest version of activemq as the following: 
http://people.apache.org/~chirino/incubator-activemq-4.0/maven1/incubator-activemq/distributions/incubator-activemq-4.0.tar.gz

(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:
https://svn.apache.org/repos/asf/incubator/activemq/trunk/cms

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.

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: http://www.nabble.com/Need+help+to+enable+a+JMS+MDB+to+receive+messages+from+a+STOMP+publisher-t1664095.html#a4525272
Sent from the ActiveMQ - User forum at Nabble.com.