Using the Mule MongoDB connector, how do you store a field as a BinData type?
<mongo:insert-object-from-map collection="#[variable:collectionName]">
<mongo:element-attributes>
<mongo:element-attribute key="msg_id">BinData(3, '#[message:id]')</mongo:element-attribute>
<mongo:element-attribute key="shortcode">#[map-payload:shortcode]</mongo:element-attribute>
<mongo:element-attribute key="msg">#[map-payload:msg]</mongo:element-attribute>
</mongo:element-attributes>
</mongo:insert-object-from-map>
This example above that I’ve tried just stores the string “BinData(3, ‘eea894d1-b0b5-11e1-91c7-a769a8d50370’)”
Is this possible?
I have actually given up on the Mule MongoDB Connector entirely because it was not reliable and failed under a heavy load. This article explained why it failed so miserably – http://www.thorntech.com/2012/07/mule-mongo-connector-fails-under-heavy-load/
It was very easy to write my own Mule component that used the standard java driver. It performed significantly better and I had no problem saving any data type I wanted.