1 of 1 people found this helpful
Your general approach seems reasonable to me.
To read messages from the TCP connection you might consider using a Camel route with Camel Netty or Mina2 component in combination with a custom codec. The Camel route can make use of the Camel ActiveMQ/JMS component to write to Active-MQ. This lets you focus on the de/coding of your device-specific tcp protocol and let Netty/Mina and Camel do all the connection handling and JMS stuff.
As for your history requirement, although ActiveMQ can use a JDBC backend as its internal message store, it's not useful as a history table. AMQ deletes the message row after having successfully delivered the message to a consumer. Instead, as you already wrote, use a Camel route and the Camel SQL component to write to your history table.
Generally I'd say it's best practice to use Camel wherever possible and only fall back to custom Java code where needed.
All mentioned Camel components are part of the Jboss Fuse 6 full install package.