Anyone got any pointers to simple examples of their use?

Through trial and error I have managed to queue a message to a mock consumer by:

Initialisation:

        TopicPartition partition = new TopicPartition(topicName, 0);
        consumer.rebalance(singletonList(partition));
        consumer.seek(partition, 0);

Queuing a message:

consumer.addRecord(new ConsumerRecord<>(topicName, 0, 0, key, obj));

Is this the recommended way of doing things? Advice welcome!

-----

The information contained in this e-mail and in any attachments is confidential 
and is designated solely for the attention of the intended recipient(s). If you 
are not an intended recipient, you must not use, disclose, copy, distribute or 
retain this e-mail or any part thereof. If you have received this e-mail in 
error, please notify the sender by return e-mail and delete all copies of this 
e-mail from your computer system(s). Please direct any additional queries to: 
communicati...@s3group.com. Thank You. Silicon and Software Systems Limited (S3 
Group). Registered in Ireland no. 378073. Registered Office: South County 
Business Park, Leopardstown, Dublin 18.

Reply via email to