activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xabhi <>
Subject ActiveMQ Object Message to json transformation not working
Date Wed, 16 Mar 2016 05:38:54 GMT

I am having trouble sending a custom Object Message to a STOMP consumer with
ActiveMQ v5.11.1

In Jconsole, I can see messages being dequeued by STOMP consumer but the
subscription callback is never called.

However note that if I send a simple string as object message it gets
processed by STOMP consumer and I receive a JSON formatted message in this

I create the message as follows:
myMessage = mySession.createObjectMessage("hello");

I am not sure what am i doing wrong here. Could anyone tell what is wrong
with this code?

Object Message class:
    public static class SampleObjectMessage implements Serializable
        private static final long serialVersionUID = 1L;
        public String data;
        public long sendTimeMs;
        public SampleObjectMessage(String data, long sendTimeMs) {
   = data;
            this.sendTimeMs = sendTimeMs;
        public String getData() {
            return data;
        public void setData(String data) {
   = data;
        public long getSendTimeMs() {
            return sendTimeMs;
        public void setSendTimeMs(long sendTimeMs) {
            this.sendTimeMs = sendTimeMs;

Code for sending ObjectMessage:
myMessage = mySession.createObjectMessage(
                     new SampleObjectMessage(getMessageText(ourMessageSize),


STOMP consumer has following headers for subscription:

var subscriptionHeaders = {
  'ack'         : 'auto',
  'transformation' : 'jms-object-json'

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message