It's not possible to plug a custom SampleSender without making change in SampleSenderFactory and recompiling jmeter. It should be possible to provide the implementation class in the config file If the jmeter dev / comitters thing are willing to accept this change then I will provide a patch (keeping backward compatibility)
How it will be done (open to discussion) : add a new optionnal parameter in the config file (ex : sample.sender.class) If the parameter is set load the class and create a new instance of the samplesender if it fails default to StandardSampleSender + log the exception else use the 'old' parameters 'mode' and 'hold_samples' Benoit Wiart Ubik Ingénierie www.ubik-ingenierie.com
This is a good idea. Regarding properties: I don't think it's necessary to add yet another property; just set hold=false and mode=classname. If the class is not found, I think the run should fail rather than reverting to StandardSampler. Please submit a patch. Ideally this should cover the factory class, jmeter.properties and the user documentation.
Created attachment 23836 [details] sample sender factory patch
Created attachment 23837 [details] jmeter.properties patch
Created attachment 23838 [details] documentation patch
Thanks for the patches, which have been applied to SVN: URL: http://svn.apache.org/viewvc?rev=786747&view=rev Log: Bug 47394 - It should be easier to plug a custom SampleSender in jmeter The updated code will be in nightly builds after r786747.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2249