On 10/25/06, robottaway <[EMAIL PROTECTED]> wrote:


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?


I don't think it makes it ActiveMQ specific.  STOMP states that you can send
frames with a
content length or with out.  Your methods are allowing the stomp client to
choose which from to use.


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.


Yay!

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).


Yeah.. NMS might need some work. :(

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?


Perhaps Brian can take your patch.. Brian, you on this list or what?  While
I would not mind having the stomp clients hosted at apache, I would rather
they get hosted at language specific sites like http://rubyforge.org/, and
CPAN, php.net, etc. etc.


--
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.


--
Regards,
Hiram

Blog: http://hiramchirino.com

Reply via email to