FairMQ/examples/multipart
Dennis Klein 5933046ffd feat(ofi)!: Remove ofi transport
BREAKING CHANGE

Due to a lack of users, we remove the experimental code. The
latest implementation can be found in release v1.4.56. This does
not mean it will never be picked up again, but for now there are
no plans.
2023-03-01 19:15:11 +01:00
..
CMakeLists.txt feat(ofi)!: Remove ofi transport 2023-03-01 19:15:11 +01:00
ex-multipart-multiple-endpoints.json Refactor the examples after move from FairRoot 2018-05-02 16:12:57 +02:00
fairmq-start-ex-multipart.sh.in Include empty parts in multipart example/test 2019-10-29 20:06:31 +01:00
Header.h reduce noise in examples 2021-05-13 23:00:35 +02:00
README.md Don't use to-be-deprecated names 2022-01-24 06:40:24 +01:00
sampler.cxx Don't use to-be-deprecated names 2022-01-24 06:40:24 +01:00
sink.cxx Example tests: check exit codes 2023-02-24 14:28:18 +01:00
test-ex-multipart.sh.in feat(ofi)!: Remove ofi transport 2023-03-01 19:15:11 +01:00

Sending Multipart messages

A topology of two devices - Sampler and Sink, communicating with PUSH-PULL pattern.

The Sampler sends a multipart message to the Sink, consisting of two message parts - header and body.

Each message part is a regular fair::mq::Message. To combine them into a multi-part message use fair::mq::Parts. Add messages to fair::mq::Parts with AddPart method.

All parts are guaranteed to be delivered together. The Receive call in the sink will recive the entire parts structure.

The header contains a simple data structure with one integer. The integer in this structure is used as a stop flag for the sink. As long as its value is 0, the Sink will keep processing the data. Once its value is 1, the data handler method of the Sink will return false, which will exit the RUNNING state of the device.