On Fri, Feb 11, 2011 at 02:44:17PM +0000, Gordon Sim wrote:
> On 02/11/2011 01:10 PM, Gordon Sim wrote:
> >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?
>
> Enabling the qmfv2 option causes one test failure:
> cluster_tests.ShortTests.test_route_update, however that actually
> appears to be due to the fact that enabling qmfv2 disables qmfv1.
> With both enabled make check passes.
Thanks, after this commit I am getting the v2 events.
-Angus
>
> Any objections to applying the attached patch to enable events for
> qmfv2? Only question I guess is what turning this option off
> actually means as it doesn't seem to prevent QMFv2 being used in
> general (just events as far as I have seen).
> Index: src/qpid/broker/Broker.h
> ===================================================================
> --- src/qpid/broker/Broker.h (revision 1069734)
> +++ src/qpid/broker/Broker.h (working copy)
> @@ -115,6 +115,7 @@
> uint32_t maxSessionRate;
> bool asyncQueueEvents;
> bool qmf2Support;
> + bool qmf1Support;
>
> private:
> std::string getHome();
> Index: src/qpid/broker/Broker.cpp
> ===================================================================
> --- src/qpid/broker/Broker.cpp (revision 1069734)
> +++ src/qpid/broker/Broker.cpp (working copy)
> @@ -102,7 +102,8 @@
> requireEncrypted(false),
> maxSessionRate(0),
> asyncQueueEvents(false), // Must be false in a cluster.
> - qmf2Support(false)
> + qmf2Support(true),
> + qmf1Support(true)
> {
> int c = sys::SystemInfo::concurrency();
> workerThreads=c+1;
> @@ -122,7 +123,8 @@
> ("max-connections", optValue(maxConnections, "N"), "Sets the maximum
> allowed connections")
> ("connection-backlog", optValue(connectionBacklog, "N"), "Sets the
> connection backlog limit for the server socket")
> ("mgmt-enable,m", optValue(enableMgmt,"yes|no"), "Enable Management")
> - ("mgmt-qmf2", optValue(qmf2Support,"yes|no"), "Use QMF v2 for Broker
> Management")
> + ("mgmt-qmf2", optValue(qmf2Support,"yes|no"), "Enable QMF v2 for
> Broker Management")
> + ("mgmt-qmf1", optValue(qmf1Support,"yes|no"), "Enable QMF v1 for
> Broker Management")
> ("mgmt-pub-interval", optValue(mgmtPubInterval, "SECONDS"),
> "Management Publish Interval")
> ("queue-purge-interval", optValue(queueCleanInterval, "SECONDS"),
> "Interval between attempts to purge any expired messages from
> queues")
> @@ -148,7 +150,7 @@
> Broker::Broker(const Broker::Options& conf) :
> poller(new Poller),
> config(conf),
> - managementAgent(conf.enableMgmt ? new ManagementAgent(!conf.qmf2Support,
> + managementAgent(conf.enableMgmt ? new ManagementAgent(conf.qmf1Support,
> conf.qmf2Support)
> : 0),
> store(new NullMessageStore),
> 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]
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]