diff --git a/examples/MQ/8-multipart/FairMQExample8Sampler.cxx b/examples/MQ/8-multipart/FairMQExample8Sampler.cxx index 8067601f..45106c20 100644 --- a/examples/MQ/8-multipart/FairMQExample8Sampler.cxx +++ b/examples/MQ/8-multipart/FairMQExample8Sampler.cxx @@ -41,6 +41,13 @@ void FairMQExample8Sampler::Run() LOG(INFO) << "Sending header with stopFlag: " << header->stopFlag; FairMQParts parts; + + parts.AddPart(NewMessage(header, // data pointer + sizeof(Ex8Header), // data size + [](void* data, void* hint) { delete static_cast(data); } // callback to deallocate after the transfer + )); + parts.AddPart(NewMessage(1000)); + LOG(INFO) << "Sending body of size: " << parts.At(1)->GetSize(); Send(parts, "data-out");