FairMQ/examples/MQ/6-multiple-channels
Alexey Rybalchenko e3cf68331a FairMQ: Extend Multipart and messaging API
- Extend the multipart API to allow sending vectors of messages or helper
   thin wrapper FairMQParts. See example in examples/MQ/8-multipart.
 - NewMessage() can be used in devices instead of
   fTransportFactory->CreateMessage().
   Possible arguments remain unchanged (no args, size or data+size).
 - Send()/Receive() methods can be used in devices instead of
   fChannels.at("chan").at(i).Send()/Receive():
   Send(msg, "chan", i = 0), Receive(msg, "chan", i = 0).
 - Use the new methods in MQ examples and tests.
 - No breaking changes, but FAIRMQ_INTERFACE_VERSION is incremented to 3
   to allow to check for new methods.
2018-05-02 13:51:55 +02:00
..
CMakeLists.txt Add FlatBuffers & MessagePack examples 2018-05-02 13:51:55 +02:00
ex6-multiple-channels.json FairMQ: Extend Multipart and messaging API 2018-05-02 13:51:55 +02:00
FairMQExample6Broadcaster.cxx FairMQ: Extend Multipart and messaging API 2018-05-02 13:51:55 +02:00
FairMQExample6Broadcaster.h Rename /example to /examples and move MQ examples in it 2018-05-02 13:51:55 +02:00
FairMQExample6Sampler.cxx FairMQ: Extend Multipart and messaging API 2018-05-02 13:51:55 +02:00
FairMQExample6Sampler.h Rename /example to /examples and move MQ examples in it 2018-05-02 13:51:55 +02:00
FairMQExample6Sink.cxx FairMQ: Extend Multipart and messaging API 2018-05-02 13:51:55 +02:00
FairMQExample6Sink.h Rename /example to /examples and move MQ examples in it 2018-05-02 13:51:55 +02:00
README.md Rename /example to /examples and move MQ examples in it 2018-05-02 13:51:55 +02:00
runExample6Broadcaster.cxx Remove compile time transport interface switch 2018-05-02 13:51:55 +02:00
runExample6Sampler.cxx Remove compile time transport interface switch 2018-05-02 13:51:55 +02:00
runExample6Sink.cxx Remove compile time transport interface switch 2018-05-02 13:51:55 +02:00

Example 6: Multiple Channels

This example demonstrates how to work with multiple channels and multiplex between them.

A topology of three devices - Sampler, Sink and Broadcaster. The Sampler sends data to the Sink via the PUSH-PULL pattern. The Broadcaster device sends a message to both Sampler and Sink containing a string "OK" every second. The Broadcaster sends the message via PUB pattern. Both Sampler and Sink, besides doing their PUSH-PULL job, listen via SUB to the Broadcaster.

The multiplexing between their data channels and the broadcast channels happens with FairMQPoller.