OpenZWave / Thrift4OZW

A daemon exposing the OpenZWave API via Apache Thrift (and some useful tools)
27 stars 13 forks source link

Placing Zwave values in body of message for ActiveMQ #7

Closed mattinbits closed 11 years ago

mattinbits commented 11 years ago

I've been using ActiveMQ and JMS to get OZW stomp messages into a Spring app in the easiest possible way. The problem is that my Message Driven Bean only gets the body value from JMS not the headers. So I've amended the code of Thrift4OZW->Main.cpp to add the header values to the message body in a simple JSON string. And added a command line flag (-j) to turn the functionality off or on. Not sure if it's worth integrating into the code since it's really a JMS problem I'm working around rather than a BoostStomp problem, and my C++ is pretty shaky, but here's the patch:

*\ Main.cpp.orig 2013-03-22 16:36:44.000000000 +0000 --- Main.cpp.new 2013-03-22 19:33:04.000000000 +0000


* 93,98 ** --- 93,102 ---- static STOMP::BoostStomp* stomp_client; static string* notifications_topic = new string("/queue/zwave/monitor");

ekarak commented 11 years ago

Many thanks, JSON would be a very nice addition! Could you fork my repo, commit your changes then I'll merge them. Warm regards!