Hi Brent,
> Is it possible to create a custom DataFormat to translate a message into a
> BlobMessage?
Sure it is.
a) Create you data format implementing org.apache.camel.spi.DataFormat
interface.
b) Add ActiveMQConnectionFactory as your DataFormat member (you will
need it to create session used to create BlobMessage)
c) Implement marshal/unmarshal methods in your data format.
d) Add it to your route.
The resulting route could look like:
DataFormat blobDataFormat = new BlobDataFormat(activeMQConnectionFactory);
from("direct:binary").unmarshall(blobDataFormat).to(...)
from("direct:blob").marshall(blobDataFormat).to(...)
However I'm not sure how ActiveMQ component handles BlobMessages
passed to it, so I can't tell you if your data format will work well
with existing Camel ActiveMQ support.
Best regards.
--
Henryk Konsek
http://henryk-konsek.blogspot.com