I'm trying to add a SolrInputDocment (which is Serializable) to an ActiveMQ queue (using a Camel producer template), but I get a MessageFormatException...any ideas?
here is my code...
SolrInputDocument doc1 = new SolrInputDocument();
doc1.addField( "id", "1234", 1.0f );
template.sendBody("activemq:queue:test", doc1);
here is my error...
Caused by: javax.jms.MessageFormatException: Only objectified primitive objects, String, Map and List types are allowed but was: id(1.0)={1234} type: class org.apache.solr.common.SolrInputField
UPDATE: the issue is that I need to explicitly set the JMSMessageType to 'Object', otherwise the MapMessage is used (which doesn't support custom types)...
template.sendBodyAndHeader("activemq:queue:test", doc1, JMS_MESSAGE_TYPE, "Object");