<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Hi --</div>
<div><br>
</div>
<div>(Please contact me by direct email for clarifications and/or follow up, I am not subscribed to the mailing list.)</div>
<div><br>
</div>
<div>I wrote a collectd Java plugin that publishes the written value lists to an Apache Kafka topic. If possible, I'd like to batch in the same message values related to each other. </div>
<div><br>
</div>
<div>For example, instead of publishing 3 separate messages corresponding to what's coming from the memory plugin:</div>
<div><br>
</div>
<div>
<div>{"info":{"collectionTimestamp":"2013-02-26T10:58:17.829-08:00","host":"dragosm-linux","plugin":"memory","type":"memory","pi":"","ti":"used"},"readings":[{"name":"value","type":"gauge","value":5.00625408E8}]} </div>
<div>{"info":{"collectionTimestamp":"2013-02-26T10:58:17.830-08:00","host":"dragosm-linux","plugin":"memory","type":"memory","pi":"","ti":"buffered"},"readings":[{"name":"value","type":"gauge","value":5.4493184E7}]} </div>
<div>{"info":{"collectionTimestamp":"2013-02-26T10:58:17.830-08:00","host":"dragosm-linux","plugin":"memory","type":"memory","pi":"","ti":"cached"},"readings":[{"name":"value","type":"gauge","value":3.43908352E8}]} </div>
</div>
<div><br>
</div>
<div>If viable I would like to send a single message that contains used, buffered and cached together. I have two questions about doing that:</div>
<ol>
<li>Are the writes from the same plugin/type/plugin instance atomic? So far I've never seen writes from different plugins interleaved but I don't want to assume that.</li><li>Is there a mechanism that signals when a plugin starts/stops writing (or alternatively to determine in advance how many writes the plugin is going to make) so I could batch the values together?</li></ol>
<div>Thanks,</div>
<div><br>
</div>
<div>-Dragos</div>
<div><br>
</div>
</body>
</html>