On 02/11/2011 04:18 AM, Ted Ross wrote:
I've put an example C++ console that receives V2 events and prints them
in subversion. It's at
qpid/cpp/bindings/qmf2/examples/cpp/print_events.cpp. This should get
you unblocked.
That example seems to have a continual busy loop in it somewhere (or am
I running it incorrectly?). It would also perhaps be nice to print out
the actual type of event.
I have a related question: by default the broker does not support QMFv2
events it seems. There is a qpidd option to turn qmfv2 on which
addresses that. However even without that option on other aspects of
QMFv2 are supported (e.g. method invocation and querying). Is there a
reason for having the v2 events disabled by default?
Index: bindings/qmf2/examples/cpp/print_events.cpp
===================================================================
--- bindings/qmf2/examples/cpp/print_events.cpp (revision 1069734)
+++ bindings/qmf2/examples/cpp/print_events.cpp (working copy)
@@ -55,7 +55,8 @@
if (session.nextEvent(event)) {
if (event.getType() == CONSOLE_EVENT) {
const Data& data(event.getData(0));
- cout << "Event: timestamp=" << event.getTimestamp() << " severity=" <<
+ cout << "Event: " << data.getSchemaId().getPackageName() << "." << data.getSchemaId().getName()
+ << " timestamp=" << event.getTimestamp() << " severity=" <<
event.getSeverity() << " content=" << data.getProperties() << endl;
}
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]