Simple but scalable RELP flooder library
-
Simple to use
-
Scales to as many threads as wanted
-
Supports user-supplied record providers to make dynamic content
-
Minimal failure tolerance, mostly meant for testing
-
Limited usability outside specific testing situations
-
Supports only one record per RELP batch
-
No TLS support yet
// Set all settings RelpFlooderConfig relpFlooderConfig = new RelpFlooderConfig(target, port, record, threads); // Alternatively use setters RelpFlooderConfig relpFlooderConfig = new RelpFlooderConfig(); relpFlooderConfig.setTarget("127.0.0.1"); relpFlooderConfig.setPort(601); relpFlooderConfig.setThreads(4); // Provide config and Iterator<byte[]> provider to RelpFlooder, here is example implementation ExampleRelpFlooderIteratorFactory exampleRelpFlooderIteratorFactory = new ExampleRelpFlooderIteratorFactory(); RelpFlooder relpFlooder = new RelpFlooder(relpFlooderConfig, exampleRelpFlooderIteratorFactory); relpFlooder.start(); relpFlooder.stop(); // Get total records and bytes sent LOGGER.info("Sent <{}> records", relpFlooder.getTotalRecordsSent()); LOGGER.info("Sent <{}> bytes", relpFlooder.getTotalBytesSent()); // Get total records and bytes sent per thread; LOGGER.info("Sent <{}> records per thread", relpFlooder.getRecordsSentPerThread()); LOGGER.info("Sent <{}> bytes per thread", relpFlooder.getTotalBytesSentPerThread());
Example Iterator will send only static records like as
<14>1 2024-02-29T13:58:05.605Z localhost rlp_09 - - - Example rlo_09 event
Configuration key | Setter | Default value | Usage |
---|---|---|---|
target |
setTarget(String target) |
127.0.0.1 |
Sets RELP target |
port |
setPort(int port) |
601 |
Sets RELP port |
threads |
setThreads(int threads) |
1 |
Flooder thread count |
You can involve yourself with our project by opening an issue or submitting a pull request.
Contribution requirements:
-
All changes must be accompanied by a new or changed test. If you think testing is not required in your pull request, include a sufficient explanation as why you think so.
-
Security checks must pass
-
Pull requests must align with the principles and values of extreme programming.
-
Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).
Read more in our Contributing Guideline.
Contributors must sign Teragrep Contributor License Agreement before a pull request is accepted to organization’s repositories.
You need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep’s repositories.