Usually, messages are created implicitly when sending messages but can also be created explicitly using make_message. In both cases, types and number of elements are known at compile time. To allow for fully dynamic message generation, CAF also offers message_builder:

message_buildermb;// prefix message with some atommb.append(strings_atom::value);// fill message with some stringsstd::vector<std::string>strings{/*...*/};for(auto&str:strings)mb.append(str);// create the messagemessagemsg=mb.to_message();