ZeroMQ Streamer
Apache Ignite ZeroMQ Streamer module enables streaming capabilities via ZeroMQ into Ignite.
To start streaming into Ignite, you need to do the following:
-
Add Ignite ZeroMQ Streamer Module to your Maven
pom.xml
file.<dependencies> ... <dependency> <groupId>org.apache.ignite</groupId> <artifactId>ignite-zeromq-ext</artifactId> <version>${ignite-zeromq-ext.version}</version> </dependency> ... </dependencies>
-
Implement either the StreamSingleTupleExtractor or the StreamMultipleTupleExtractor for ZeroMQ streamer. Refer to this sample implementation for more details.
-
Set the extractor and initiate the streaming as shown below:
try (IgniteDataStreamer<Integer, String> dataStreamer = grid().dataStreamer("myCacheName")) { dataStreamer.allowOverwrite(true); dataStreamer.autoFlushFrequency(1); try (IgniteZeroMqStreamer streamer = new IgniteZeroMqStreamer( 1, ZeroMqTypeSocket.PULL, "tcp://localhost:5671", null)) { streamer.setIgnite(grid()); streamer.setStreamer(dataStreamer); streamer.setSingleTupleExtractor(new ZeroMqStringSingleTupleExtractor()); streamer.start(); } }
© 2024 The Apache Software Foundation.
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.