protected boolean putToQueue ( IQueueMessage < ID , DATA > msg ) { try { BytesMessage message = getProducerSession ( ) . createBytesMessage ( ) ; message . writeBytes ( serialize ( msg ) ) ; getMessageProducer ( ) . send ( message ) ; return true ; } catch ( Exception e ) { throw e instanceof QueueException ? ( QueueException ) e : new QueueException ( e ) ; } }
Puts a message to ActiveMQ queue .