i trying publish text message topic using apache camel activemq. following code works fine , client program able convert message text message.
<route id="settext"> <from uri="restlet:///test/{testid}?restletmethod=post" /> <setexchangepattern pattern="inonly" /> <setbody> <simple>${header.testid}:${body}</simple> </setbody> <to uri="activemq:topic:testtopic" /> </route>
now added multicast multiple operations. multicast able perform , send message topic successfully.
<route id="settext"> <from uri="restlet:///test/{testid}?restletmethod=post" /> <setexchangepattern pattern="inonly" /> <multicast> <pipeline> <!-- operation --> </pipeline> <setbody> <simple>${header.testid}:${body}</simple> </setbody> <to uri="activemq:topic:testtopic" /> </multicast> </route>
but while sending text message topic, multicast converting message byte stream. client program unable convert consumed message textmessage bcoz message in bye format , below information displayed system.out.println(at client program)
activemqbytesmessage {commandid = 5, responserequired = true, messageid = id:r-014-49827-1433324560754-3:1:1:1:1, originaldestination = null, originaltransactionid = null, producerid = id:r-014-49827-1433324560754-3:1:1:1, destination = topic://testtopic, transactionid = null, expiration = 0, timestamp = 1433324582980, arrival = 0, brokerintime = 1433324582981, brokerouttime = 1433324583731, correlationid = null, replyto = null, persistent = true, type = null, priority = 4, groupid = null, groupsequence = 0, targetconsumerid = null, compressed = false, userid = null, content = org.apache.activemq.util.bytesequence@10d42d49, marshalledproperties = org.apache.activemq.util.bytesequence@59e91c40, datastructure = null, redeliverycounter = 0, size = 0, properties = {breadcrumbid=id-r-014-49826-1433324557692-2-1, org_dot_restlet_dot_http_dot_version=1.1, testid=3100026, org_dot_restlet_dot_starttime=1433324582521, camelhttpmethod=put, camelhttpuri=http://localhost:8080/service-bus/test/3100026}, readonlyproperties = true, readonlybody = true, droppable = false} activemqbytesmessage{ bytesout = null, dataout = null, datain = null }
can suggest why multicast converting text message byte format? , send message in text format? in advance.
i not sure version of camel on, have seen similar issue jaxb dataformat converting messages bytes. recommend opening jira ticket. in meantime work around used enforce text type on jms endpoint.
activemq:topic:testtopic?jmsmessagetype=text
reference: http://camel.apache.org/jms.html
Comments
Post a Comment