首页 > 解决方案 > Apache Camel: What meaning of "attachments" in message model?

问题描述

I read the book Camel in Action. But I can't understand what attachment mean in its message model.

I know headers such like sender information, receiver information, or data encoding etc. However, I don't know what is mean of attachments?

标签: apache-camel

解决方案


Lets run through some examples

  • You are consuming a file, camel can create a message with contents of the file as payload and file name etc as message headers
  • You are consuming a jms message, camel can create a message with contents of jms message as payload and jms header etc as message headers.
  • You are sending simple http request, camel can crate a message with what is inside the http request as paylaod and url etc as headers

Then you have some other components

  • You can send an email with some text in the body and some attachments, so in this case camel creates a message with payload, headers and attachments
  • You can also send SOAP request with attachments, in this case also, camel creates the message with payload, headers and attachments.

But there is not many camel components which support attachment. There is few like email, soap service etc


推荐阅读