activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robottaway <rotta...@musiciansfriend.com>
Subject Re: Ruby STOMP client - TextMessage
Date Wed, 25 Oct 2006 19:52:46 GMT

The change to Brian's Ruby client is done. You now can call either send (for
JMS BinaryMessage) or sendTextMessage (for JMS TextMessage) on the client.
These will map into the STOMP transport nicely. Reading either TextMessages
or ByteMessages from the queue works as before my changes. I have only
tested the client changes in AMQ 4.0.2 so far (see section below).

Question: The sendTextMessage method will not include the header
'content-length'. Does this make the method non-functional with a true STOMP
implementation? Asking this in another way, does STOMP always expect the
'content-length' header to be set? Or is this header strictly related to
AMQ's transport implementation? The new sendTextMessage method will work
great for the AMQ STOMP transport, but would it work with any properly
implemented STOMP server?

TESTING:
My test so far consisted of:
One queue: foo.bar

2 x
Setting a writer to constantly spam 20 binary messages per second to AMQ
through the updated STOMP Ruby client

2 x
Setting a producer to constantly spam 20 text messages per second to AMQ
through the updated STOMP Ruby client

One consumer which uses the STOMP Ruby client to consume all these messages!
(I then added another consumer on the fly and things worked fine)

The consumers and producers are running on a 3.0 GHz IBM PC, and AMQ 4.0.2
is running on my MacBook.

So far I have run through around 40k messages, or about 10k per producer.
The consumer does not seem to have any troubles. I have jconsole running and
it looks like every message produced has been consumed. Thats good enough
for me right now.

I also had my Windows service, which uses the NMS AMQ implementation :),
come online and also subscribe to the foo.bar queue. This ran a bit and got
text messages no problem (although exceptions are caught for the
BinaryMessage).

BTW:
Where should I upload this code to? If what I mentioned above makes this
client sorta AMQ specific then maybe it should exist on AMQ's site rather
than STOMP?
-- 
View this message in context: http://www.nabble.com/Ruby-STOMP-client---TextMessage-tf2504913.html#a6999015
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message