I have been developing a threaded data pooling system interconnected with ActiveMQ-cpp (library version 3.8.2). The system manages a group of devices which can be pooled periodically, the poll results sent to a queue in the broker. The answers queue can be changed in any time by a control message, so the producers and destinations are constantly changed. Only one subscriber receives all the control commands, and several threads create producers and messages from their own sessions. All messages are TextMessages.
All activemq-cpp elements are wrapped around in RAII elements, yet at some point after intensive usage, the connection receives messages but when I try to send a response the library throws an exception reading "Thread Local storage limit reached". Afterwards it receives a few more messages (sometimes text is broken) but trying to emit new messages fall again in the Thread storage exception and then stops receiving and sending entirely.
Has anybody found this kind of issue? Any help is welcome.
Update: I have compiled and used the new 3.8.3 version and can still reproduce the error. Tests are done in RHEL 5.7 and Fedora 20, both 64 bits architectures.