Recommended way to access Kafka producer object in a Quartz Job

15 views
Skip to first unread message

Mayank Jain

unread,
Aug 11, 2016, 11:50:58 AM8/11/16
to clojure-quartz
Hi,

I am writing a HTTP layer around Quartz for scheduling.
And we are using component library.

My job definition needs to push some data to Kafka for which it'll need to Kafka object.
What is the best way to access it from a job when it gets triggered?
One way would be to directly access the system global map and pull the kafka object from it to send data to it.

Other way could be to directly store it in job params as an object but it could lead to stale object being accessed.
Last way I can think of it to store reference to a var to Kafka inside the job.
But since I am using Persistance (PG), the var can get stale in future causing other kinds of issues.

Is there a recommended way to handle such issues?

Thanks.
Reply all
Reply to author
Forward
0 new messages