Wai Yang Yap wrote:
My name is Wai Yang Yap and I'm new in the JMS & QPID.
Hello and welcome!
I have experimented with QPID for a week now, and I got the Java
Subscriber and Ruby Publisher working. So I can send messages from Ruby
to Java with the QPID broker in between them. The problem that I have
now, is when I use the same setup (only reverse, Java sending messages
to Ruby), it crashes at Ruby. Ruby receives the messages, but when it
tries to parse the message, it crashes.
The exception that it gives is:
undefined method `timestamp' for #<Codec::Decoder:0x2e388a0>
This is due to the ruby client not handling AMQP 'timestamp' fields. The
java client is presumably sending such a field in messages by default.
I've created a JIRA for this issue:
https://issues.apache.org/jira/browse/QPID-1138
Could you try the attached patch? I believe this should fix the problem.
Index: qpid/codec.rb
===================================================================
--- qpid/codec.rb (revision 666996)
+++ qpid/codec.rb (working copy)
@@ -73,6 +73,10 @@
long(lower)
end
+ def timestamp(l)
+ longlong(l)
+ end
+
def shortstr(s)
# shortstr is actually octetstr
octet(s.length)
@@ -200,6 +204,10 @@
return upper << 32 | lower
end
+ def timestamp()
+ return longlong()
+ end
+
def shortstr()
# shortstr is actually octetstr
return read(octet())