Chapter 277. Java Object Serialization DataFormat
Available as of Camel version 2.12
Serialization is a Data Format which uses the standard Java Serialization mechanism to unmarshal a binary payload into Java objects or to marshal Java objects into a binary blob.
For example the following uses Java serialization to unmarshal a binary file then send it as an ObjectMessage to ActiveMQ
from("file://foo/bar").
unmarshal().serialization().
to("activemq:Some.Queue");277.1. Options
The Java Object Serialization dataformat supports 1 options which are listed below.
| Name | Default | Java Type | Description |
|---|---|---|---|
| contentTypeHeader |
|
| Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSon etc. |
277.2. Dependencies
This data format is provided in camel-core so no additional dependencies is needed.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.