You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Victor Perez <vp...@gmail.com> on 2011/09/28 18:41:27 UTC

STOMP NMS: cannot retrieve messages published from ruby

We have a Ruby app publishing messages to ActiveMQ through STOMP. When I use
Apache.NMS.Stomp in .NET to consume the messages, they come in as
IBytesMessage with no content.

If I use NMS to publish a message, it can be consumed with no problems by
our ruby, java and NMS (.NET) apps.
When i publish the message from ruby, it can be consumed by ruby and java
but not NMS.

Any ideas?

Re: STOMP NMS: cannot retrieve messages published from ruby

Posted by Victor Perez <vp...@gmail.com>.
On Wed, Sep 28, 2011 at 5:19 PM, Timothy Bish <ta...@gmail.com> wrote:

> On Wed, 2011-09-28 at 15:55 -0500, Victor Perez wrote:
> > On Wed, Sep 28, 2011 at 3:17 PM, Timothy Bish <ta...@gmail.com>
> wrote:
> >
> > > On Wed, 2011-09-28 at 15:09 -0500, Victor Perez wrote:
> > > > On Wed, Sep 28, 2011 at 1:47 PM, Timothy Bish <ta...@gmail.com>
> > > wrote:
> > > >
> > > > > On Wed, 2011-09-28 at 11:41 -0500, Victor Perez wrote:
> > > > > > We have a Ruby app publishing messages to ActiveMQ through STOMP.
> > > When I
> > > > > use
> > > > > > Apache.NMS.Stomp in .NET to consume the messages, they come in as
> > > > > > IBytesMessage with no content.
> > > > > >
> > > > > > If I use NMS to publish a message, it can be consumed with no
> > > problems by
> > > > > > our ruby, java and NMS (.NET) apps.
> > > > > > When i publish the message from ruby, it can be consumed by ruby
> and
> > > java
> > > > > > but not NMS.
> > > > > >
> > > > > > Any ideas?
> > > > >
> > > > > Capturing the frame that the ruby client is sending would help,
> also
> > > > > knowing what versions of AMQ and .NET client would be good.
> > > > >
> > > > > Regards
> > > > >
> > > > > --
> > > > > Tim Bish
> > > > > ------------
> > > > > FuseSource
> > > > > Email: tim.bish@fusesource.com
> > > > > Web: http://fusesource.com
> > > > > Twitter: tabish121
> > > > > Blog: http://timbish.blogspot.com/
> > > > >
> > > > >
> > > > >
> > > > > AMQ server is 1.5.0
> > > > .NET is 1.5.0 for Apache.NMS (from NuGet package) and 1.5.1 for
> > > > Apache.NMS.Stomp (compiled from sources)
> > > > I have no idea how to capture frames (wireshark?)
> > > >
> > > > I compiled trunk NMS and Stomp and got it to work with latest AMQ
> (5.5.0)
> > > > running locally. Problem persists when using our production AMQ.
> > > >
> > > > Thanks
> > >
> > > Have a look at the Stomp page at the ActiveMQ site, the debugging
> > > section tells you how to enable logging for frames that are sent and
> > > received.
> > >
> > > http://activemq.apache.org/stomp.html
> > >
> > > Knowing what the Ruby client is sending to the broker and what the
> > > broker is sending to NMS.Stomp would help to figure out why NMS isn't
> > > giving you a valid message.
> > >
> > > Regards
> > >
> > >
> > > --
> > > Tim Bish
> > > ------------
> > > FuseSource
> > > Email: tim.bish@fusesource.com
> > > Web: http://fusesource.com
> > > Twitter: tabish121
> > > Blog: http://timbish.blogspot.com/
> > >
> > >
> > >
> > > It seems that uncommenting the line for the frame IO doesn't have any
> > effect: log4j.logger.org.apache.activemq.transport.stomp.StompIO=TRACE,
> > stomp
> >
> > This is what i got with trace:
> > --- publish from ruby ---
> >
> > 2011-09-28 15:46:12,341 [127.0.0.1:56861] TRACE
> > StompTransportFilter           - Received:
> > CONNECT
> > content-type:text/plain; charset=UTF-8
> > content-length:0
> > passcode:*****
> > login:
> >
> >
> > 2011-09-28 15:46:12,343 [127.0.0.1:56861] TRACE
> > StompTransportFilter           - Sending:
> > CONNECTED
> > session:ID:ZPW7PLAP041-56857-1317242756357-4:1
> >
> >
> > 2011-09-28 15:46:12,347 [127.0.0.1:56861] TRACE
> > StompTransportFilter           - Received:
> > SEND
> > content-type:text/plain; charset=UTF-8
> > destination:/queue/development/rrvc/ssa/request
> > persistent:true
> > content-length:99
> >
> > ---
> > dob: "1971-11-11"
> > order_id: "101"
> > ssn: "...e: " Some "
> >
> > --- end ---
> >
> > --- publish from NMS ---
> > 2011-09-28 15:46:57,121 [127.0.0.1:56868] TRACE
> > StompTransportFilter           - Received:
> > CONNECT
> > heart-beat:10000,30000
> > host:localhost
> > accept-version:1.0,1.1
> > client-id:ID:ZPW7PLAP041-56869-634528216169788254-0:0
> >
> >
> > 2011-09-28 15:46:57,124 [127.0.0.1:56868] TRACE
> > StompTransportFilter           - Sending:
> > CONNECTED
> > session:ID:ZPW7PLAP041-56869-634528216169788254-0:0
> >
> >
> > 2011-09-28 15:46:57,266 [127.0.0.1:56868] TRACE
> > StompTransportFilter           - Received:
> > SEND
> > receipt:2
> > NMSXDeliveryMode:true
> > destination:/queue/development/rrvc/ssa/request
> > timestamp:1317242817255
> > persistent:true
> > priority:5
> >
> > %YAML 1.2
> > ---
> > !CBSV.Processor.Messages.Veri...rra S
> > ...
> > --- end ---
> >
> > Notable difference here is the content-length header in the ruby message,
> it
> > must be throwing off NMS and making it return IBytesMessage.
> >
> > Thanks
>
> If you look at the Stomp page http://activemq.apache.org/stomp.html it
> documents that for ActiveMQ content-length set means BytesMessage.
>
> --
> Tim Bish
> ------------
> FuseSource
> Email: tim.bish@fusesource.com
> Web: http://fusesource.com
> Twitter: tabish121
> Blog: http://timbish.blogspot.com/
>
>
>
> I understand that, they issue is NMS is returning ByteMessage with null
content even when the same message can be consumed just fine by a 5 line
ruby script.

It works if everything runs latest version but upgrading our JMS server is
out of the question right now. If a simple ruby app is able to receive the
message then there is something wrong with the way NMS is receiving them.

Right now I am writing my own stomp client in .NET, seems easier than trying
to figure this out.

Thanks for your help.

Re: STOMP NMS: cannot retrieve messages published from ruby

Posted by Timothy Bish <ta...@gmail.com>.
On Wed, 2011-09-28 at 15:55 -0500, Victor Perez wrote:
> On Wed, Sep 28, 2011 at 3:17 PM, Timothy Bish <ta...@gmail.com> wrote:
> 
> > On Wed, 2011-09-28 at 15:09 -0500, Victor Perez wrote:
> > > On Wed, Sep 28, 2011 at 1:47 PM, Timothy Bish <ta...@gmail.com>
> > wrote:
> > >
> > > > On Wed, 2011-09-28 at 11:41 -0500, Victor Perez wrote:
> > > > > We have a Ruby app publishing messages to ActiveMQ through STOMP.
> > When I
> > > > use
> > > > > Apache.NMS.Stomp in .NET to consume the messages, they come in as
> > > > > IBytesMessage with no content.
> > > > >
> > > > > If I use NMS to publish a message, it can be consumed with no
> > problems by
> > > > > our ruby, java and NMS (.NET) apps.
> > > > > When i publish the message from ruby, it can be consumed by ruby and
> > java
> > > > > but not NMS.
> > > > >
> > > > > Any ideas?
> > > >
> > > > Capturing the frame that the ruby client is sending would help, also
> > > > knowing what versions of AMQ and .NET client would be good.
> > > >
> > > > Regards
> > > >
> > > > --
> > > > Tim Bish
> > > > ------------
> > > > FuseSource
> > > > Email: tim.bish@fusesource.com
> > > > Web: http://fusesource.com
> > > > Twitter: tabish121
> > > > Blog: http://timbish.blogspot.com/
> > > >
> > > >
> > > >
> > > > AMQ server is 1.5.0
> > > .NET is 1.5.0 for Apache.NMS (from NuGet package) and 1.5.1 for
> > > Apache.NMS.Stomp (compiled from sources)
> > > I have no idea how to capture frames (wireshark?)
> > >
> > > I compiled trunk NMS and Stomp and got it to work with latest AMQ (5.5.0)
> > > running locally. Problem persists when using our production AMQ.
> > >
> > > Thanks
> >
> > Have a look at the Stomp page at the ActiveMQ site, the debugging
> > section tells you how to enable logging for frames that are sent and
> > received.
> >
> > http://activemq.apache.org/stomp.html
> >
> > Knowing what the Ruby client is sending to the broker and what the
> > broker is sending to NMS.Stomp would help to figure out why NMS isn't
> > giving you a valid message.
> >
> > Regards
> >
> >
> > --
> > Tim Bish
> > ------------
> > FuseSource
> > Email: tim.bish@fusesource.com
> > Web: http://fusesource.com
> > Twitter: tabish121
> > Blog: http://timbish.blogspot.com/
> >
> >
> >
> > It seems that uncommenting the line for the frame IO doesn't have any
> effect: log4j.logger.org.apache.activemq.transport.stomp.StompIO=TRACE,
> stomp
> 
> This is what i got with trace:
> --- publish from ruby ---
> 
> 2011-09-28 15:46:12,341 [127.0.0.1:56861] TRACE
> StompTransportFilter           - Received:
> CONNECT
> content-type:text/plain; charset=UTF-8
> content-length:0
> passcode:*****
> login:
> 
> 
> 2011-09-28 15:46:12,343 [127.0.0.1:56861] TRACE
> StompTransportFilter           - Sending:
> CONNECTED
> session:ID:ZPW7PLAP041-56857-1317242756357-4:1
> 
> 
> 2011-09-28 15:46:12,347 [127.0.0.1:56861] TRACE
> StompTransportFilter           - Received:
> SEND
> content-type:text/plain; charset=UTF-8
> destination:/queue/development/rrvc/ssa/request
> persistent:true
> content-length:99
> 
> ---
> dob: "1971-11-11"
> order_id: "101"
> ssn: "...e: " Some "
> 
> --- end ---
> 
> --- publish from NMS ---
> 2011-09-28 15:46:57,121 [127.0.0.1:56868] TRACE
> StompTransportFilter           - Received:
> CONNECT
> heart-beat:10000,30000
> host:localhost
> accept-version:1.0,1.1
> client-id:ID:ZPW7PLAP041-56869-634528216169788254-0:0
> 
> 
> 2011-09-28 15:46:57,124 [127.0.0.1:56868] TRACE
> StompTransportFilter           - Sending:
> CONNECTED
> session:ID:ZPW7PLAP041-56869-634528216169788254-0:0
> 
> 
> 2011-09-28 15:46:57,266 [127.0.0.1:56868] TRACE
> StompTransportFilter           - Received:
> SEND
> receipt:2
> NMSXDeliveryMode:true
> destination:/queue/development/rrvc/ssa/request
> timestamp:1317242817255
> persistent:true
> priority:5
> 
> %YAML 1.2
> ---
> !CBSV.Processor.Messages.Veri...rra S
> ...
> --- end ---
> 
> Notable difference here is the content-length header in the ruby message, it
> must be throwing off NMS and making it return IBytesMessage.
> 
> Thanks

If you look at the Stomp page http://activemq.apache.org/stomp.html it
documents that for ActiveMQ content-length set means BytesMessage.

-- 
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/




Re: STOMP NMS: cannot retrieve messages published from ruby

Posted by Victor Perez <vp...@gmail.com>.
On Wed, Sep 28, 2011 at 3:17 PM, Timothy Bish <ta...@gmail.com> wrote:

> On Wed, 2011-09-28 at 15:09 -0500, Victor Perez wrote:
> > On Wed, Sep 28, 2011 at 1:47 PM, Timothy Bish <ta...@gmail.com>
> wrote:
> >
> > > On Wed, 2011-09-28 at 11:41 -0500, Victor Perez wrote:
> > > > We have a Ruby app publishing messages to ActiveMQ through STOMP.
> When I
> > > use
> > > > Apache.NMS.Stomp in .NET to consume the messages, they come in as
> > > > IBytesMessage with no content.
> > > >
> > > > If I use NMS to publish a message, it can be consumed with no
> problems by
> > > > our ruby, java and NMS (.NET) apps.
> > > > When i publish the message from ruby, it can be consumed by ruby and
> java
> > > > but not NMS.
> > > >
> > > > Any ideas?
> > >
> > > Capturing the frame that the ruby client is sending would help, also
> > > knowing what versions of AMQ and .NET client would be good.
> > >
> > > Regards
> > >
> > > --
> > > Tim Bish
> > > ------------
> > > FuseSource
> > > Email: tim.bish@fusesource.com
> > > Web: http://fusesource.com
> > > Twitter: tabish121
> > > Blog: http://timbish.blogspot.com/
> > >
> > >
> > >
> > > AMQ server is 1.5.0
> > .NET is 1.5.0 for Apache.NMS (from NuGet package) and 1.5.1 for
> > Apache.NMS.Stomp (compiled from sources)
> > I have no idea how to capture frames (wireshark?)
> >
> > I compiled trunk NMS and Stomp and got it to work with latest AMQ (5.5.0)
> > running locally. Problem persists when using our production AMQ.
> >
> > Thanks
>
> Have a look at the Stomp page at the ActiveMQ site, the debugging
> section tells you how to enable logging for frames that are sent and
> received.
>
> http://activemq.apache.org/stomp.html
>
> Knowing what the Ruby client is sending to the broker and what the
> broker is sending to NMS.Stomp would help to figure out why NMS isn't
> giving you a valid message.
>
> Regards
>
>
> --
> Tim Bish
> ------------
> FuseSource
> Email: tim.bish@fusesource.com
> Web: http://fusesource.com
> Twitter: tabish121
> Blog: http://timbish.blogspot.com/
>
>
>
> It seems that uncommenting the line for the frame IO doesn't have any
effect: log4j.logger.org.apache.activemq.transport.stomp.StompIO=TRACE,
stomp

This is what i got with trace:
--- publish from ruby ---

2011-09-28 15:46:12,341 [127.0.0.1:56861] TRACE
StompTransportFilter           - Received:
CONNECT
content-type:text/plain; charset=UTF-8
content-length:0
passcode:*****
login:


2011-09-28 15:46:12,343 [127.0.0.1:56861] TRACE
StompTransportFilter           - Sending:
CONNECTED
session:ID:ZPW7PLAP041-56857-1317242756357-4:1


2011-09-28 15:46:12,347 [127.0.0.1:56861] TRACE
StompTransportFilter           - Received:
SEND
content-type:text/plain; charset=UTF-8
destination:/queue/development/rrvc/ssa/request
persistent:true
content-length:99

---
dob: "1971-11-11"
order_id: "101"
ssn: "...e: " Some "

--- end ---

--- publish from NMS ---
2011-09-28 15:46:57,121 [127.0.0.1:56868] TRACE
StompTransportFilter           - Received:
CONNECT
heart-beat:10000,30000
host:localhost
accept-version:1.0,1.1
client-id:ID:ZPW7PLAP041-56869-634528216169788254-0:0


2011-09-28 15:46:57,124 [127.0.0.1:56868] TRACE
StompTransportFilter           - Sending:
CONNECTED
session:ID:ZPW7PLAP041-56869-634528216169788254-0:0


2011-09-28 15:46:57,266 [127.0.0.1:56868] TRACE
StompTransportFilter           - Received:
SEND
receipt:2
NMSXDeliveryMode:true
destination:/queue/development/rrvc/ssa/request
timestamp:1317242817255
persistent:true
priority:5

%YAML 1.2
---
!CBSV.Processor.Messages.Veri...rra S
...
--- end ---

Notable difference here is the content-length header in the ruby message, it
must be throwing off NMS and making it return IBytesMessage.

Thanks

Re: STOMP NMS: cannot retrieve messages published from ruby

Posted by Timothy Bish <ta...@gmail.com>.
On Wed, 2011-09-28 at 15:09 -0500, Victor Perez wrote:
> On Wed, Sep 28, 2011 at 1:47 PM, Timothy Bish <ta...@gmail.com> wrote:
> 
> > On Wed, 2011-09-28 at 11:41 -0500, Victor Perez wrote:
> > > We have a Ruby app publishing messages to ActiveMQ through STOMP. When I
> > use
> > > Apache.NMS.Stomp in .NET to consume the messages, they come in as
> > > IBytesMessage with no content.
> > >
> > > If I use NMS to publish a message, it can be consumed with no problems by
> > > our ruby, java and NMS (.NET) apps.
> > > When i publish the message from ruby, it can be consumed by ruby and java
> > > but not NMS.
> > >
> > > Any ideas?
> >
> > Capturing the frame that the ruby client is sending would help, also
> > knowing what versions of AMQ and .NET client would be good.
> >
> > Regards
> >
> > --
> > Tim Bish
> > ------------
> > FuseSource
> > Email: tim.bish@fusesource.com
> > Web: http://fusesource.com
> > Twitter: tabish121
> > Blog: http://timbish.blogspot.com/
> >
> >
> >
> > AMQ server is 1.5.0
> .NET is 1.5.0 for Apache.NMS (from NuGet package) and 1.5.1 for
> Apache.NMS.Stomp (compiled from sources)
> I have no idea how to capture frames (wireshark?)
> 
> I compiled trunk NMS and Stomp and got it to work with latest AMQ (5.5.0)
> running locally. Problem persists when using our production AMQ.
> 
> Thanks

Have a look at the Stomp page at the ActiveMQ site, the debugging
section tells you how to enable logging for frames that are sent and
received.  

http://activemq.apache.org/stomp.html

Knowing what the Ruby client is sending to the broker and what the
broker is sending to NMS.Stomp would help to figure out why NMS isn't
giving you a valid message.

Regards


-- 
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/




Re: STOMP NMS: cannot retrieve messages published from ruby

Posted by Victor Perez <vp...@gmail.com>.
On Wed, Sep 28, 2011 at 1:47 PM, Timothy Bish <ta...@gmail.com> wrote:

> On Wed, 2011-09-28 at 11:41 -0500, Victor Perez wrote:
> > We have a Ruby app publishing messages to ActiveMQ through STOMP. When I
> use
> > Apache.NMS.Stomp in .NET to consume the messages, they come in as
> > IBytesMessage with no content.
> >
> > If I use NMS to publish a message, it can be consumed with no problems by
> > our ruby, java and NMS (.NET) apps.
> > When i publish the message from ruby, it can be consumed by ruby and java
> > but not NMS.
> >
> > Any ideas?
>
> Capturing the frame that the ruby client is sending would help, also
> knowing what versions of AMQ and .NET client would be good.
>
> Regards
>
> --
> Tim Bish
> ------------
> FuseSource
> Email: tim.bish@fusesource.com
> Web: http://fusesource.com
> Twitter: tabish121
> Blog: http://timbish.blogspot.com/
>
>
>
> AMQ server is 1.5.0
.NET is 1.5.0 for Apache.NMS (from NuGet package) and 1.5.1 for
Apache.NMS.Stomp (compiled from sources)
I have no idea how to capture frames (wireshark?)

I compiled trunk NMS and Stomp and got it to work with latest AMQ (5.5.0)
running locally. Problem persists when using our production AMQ.

Thanks

Re: STOMP NMS: cannot retrieve messages published from ruby

Posted by Timothy Bish <ta...@gmail.com>.
On Wed, 2011-09-28 at 11:41 -0500, Victor Perez wrote:
> We have a Ruby app publishing messages to ActiveMQ through STOMP. When I use
> Apache.NMS.Stomp in .NET to consume the messages, they come in as
> IBytesMessage with no content.
> 
> If I use NMS to publish a message, it can be consumed with no problems by
> our ruby, java and NMS (.NET) apps.
> When i publish the message from ruby, it can be consumed by ruby and java
> but not NMS.
> 
> Any ideas?

Capturing the frame that the ruby client is sending would help, also
knowing what versions of AMQ and .NET client would be good.  

Regards

-- 
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/