This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Why is my message body empty?
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Why is my message empty?

In Camel the message body can be of any types. Some types are safely readable multiple times, and therefore do not 'suffer' from becoming 'empty'.
So when you message body suddenly is empty, then that is often related to using a message type that is no re-readable; in other words, the message
body can only be read once. On subsequent reads the body is now empty. This happens with types that are streaming based, such as java.util.InputStream etc.

A number of Camel components supports and use streaming types out of the box. For example the HTTP related components, and CXF etc.

Camel offers a functionality Stream caching; that caches the stream, so it can be re-readable. By enabling this cache, the message body
would no longer be empty.

  • No labels