Did anyone check this patch. I would like to continue to work on this and just want to be sure that I'm heading in the right direction.
Also, there are two open questions: - should I add JSON mapper in the AMQ distribution or not? - should we be compatible with current handling of byte messages (content-length header). Regards, Dejan On 9/27/06, Dejan Bosanac (JIRA) <[EMAIL PROTECTED]> wrote:
Pluggable Stomp Message Mapping ------------------------------- Key: AMQ-943 URL: https://issues.apache.org/activemq/browse/AMQ-943 Project: ActiveMQ Issue Type: Improvement Components: Transport Affects Versions: 4.1 Reporter: Dejan Bosanac Fix For: 4.1 Attachments: protocol-mapping.patch I have finally found time to finish this. Here's the draft version of the Pluggable Stomp Message Mapping implementation. Few notes: - New interface has been defined: ProtocolMapping (I wanted to use the same name as the message header that we check) - There are two implementations of this interface: DefaultProtocolMapping and ByteProtocolMapping - I used FactoryFinder to create appropriate mapper. The finder use the following path to find keys: META-INF/services/org/apache/activemq/transport/mapping/ (we can change this if you want) - The appropriate mapper is used according to the "protocol-mapping" header in the CONNECT message. For example protocol-mapping:byte for ByteProtocolMapping handler. - Currently I have implemented only the mapper for BytesMessage since I wasn't sure whether you want to integrate JSON mapper for MapMessages or distribute it in a separate library. - I have changed the test case that tests subscription for byte messages - This solution is not compatible with current mapping for byte messages. If you want backward compatibility, I can hard-code it in a ProtocolConverter class (as it was) since it could not be implemented through this mechanism. TODO: - test it more (create more unit test cases and test it more in a real environment) - create a proper documentation so others can create their handlers. - create a proper JavaDoc documentation for key interfaces and classes - create JSON mapper (integrated or external) - fix STOMP client(s) Give it a try and let me know your impressions Dejan Bosanac -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira