Hi Emile,<div>You put me in the right direction. Thanks!</div><div>Using JSon I now get this from Spring:</div><div><br></div><div><div><font face="courier new, monospace">Exception in thread &quot;main&quot; org.springframework.amqp.support.converter.MessageConversionException: failed to convert Message content. Could not resolve</font></div>
<div><font face="courier new, monospace">�__TypeId__ in header</font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.springframework.amqp.support.converter.DefaultJavaTypeMapper.retrieveHeader(DefaultJavaTypeMapper.java:104)</font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.springframework.amqp.support.converter.DefaultJavaTypeMapper.toJavaType(DefaultJavaTypeMapper.java:53)</font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.springframework.amqp.support.converter.JsonMessageConverter.fromMessage(JsonMessageConverter.java:118)</font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.springframework.amqp.rabbit.core.RabbitTemplate.receiveAndConvert(RabbitTemplate.java:425)</font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre">        </span>at trc.suivi.amqp.Consumer.main(Consumer.java:12)</font></div>
</div><div><font face="courier new, monospace"><br></font></div><div>Do you have any idea what this means?</div><div><br></div><div>Regards,</div><div>J.<br><br><div class="gmail_quote">2012/12/12 Emile Joubert <span dir="ltr">&lt;<a href="mailto:emile@rabbitmq.com" target="_blank">emile@rabbitmq.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Julien,<br>
<br>
On 12/12/12 12:01, Julien Martin wrote:<br>
&gt; pickled_me = pickle.dumps(me)<br>
<div class="im"><br>
&gt; Person me = (Person) template.receiveAndConvert(&quot;myqueue&quot;);<br>
<br>
</div>&gt; I get a *class cast exception*<br>
<br>
It looks like you are attempting to mix Python and Java serialisation<br>
formats. RabbitMQ does not modify or process the message payload in any<br>
way, so if you use incompatible formats then the broker won&#39;t solve that<br>
problem for you.<br>
<br>
I suggest you select a serialisation format that is supported by all<br>
languages that need to interoperate. JSON, XML, Protocol Buffers and<br>
YAML are popular choices, but there are many more, e.g. see<br>
<a href="http://en.wikipedia.org/wiki/Category:Data_serialization_formats" target="_blank">http://en.wikipedia.org/wiki/Category:Data_serialization_formats</a><br>
<br>
Once you have selected and implemented a compatible serialisation format<br>
you should test it by serialising to and deserialising from files. Once<br>
you have that working you can use a broker to pass messages in your<br>
chosen serialisation format between clients.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-Emile<br>
<br>
<br>
<br>
</font></span></blockquote></div><br></div>