There must be some API or library that you can use to communicate with Kafka. I guess you have to study the documentation for Kafka project for more information.
Hi Anton, there are libraries for me to put the data on a Kafka queue, but what I am looking for is event listeners and not event forwarding, I want another event handler/listener and not the default MainEventHandler class to receive the event.
Just add another handler then, but I don't really see much difference.
I don't want to modify traccars library, as I have an application running with traccar included as a dependency. I want to get my application listening for the events.
I have no idea what you want. You don't want to use forwarding, but you don't want to modify code either. You should probably explain why you don't want to use forwarding.
Hi Anton,
Apologies, might have not worded my sentences correctly over the weekend.
I have a maven project which I have included traccar as a dependency. I don't want to modify the source code of traccar either. Perhaps this might be the better solution and might just end up going this route and creating a pull request.
The reason why I don't want to use event forwarding is because it's not another server I am trying to forward to, but a service on my application where traccar is a dependency. I don't see why I should be forwarding through to a web server, when I should be able to simply add a Listener to the MainEventHandler and simply receive the raw "event" to my Listener that I specify.
I hope this make's more sense.
That makes more sense. I think dynamic handlers might work for your case. Check "addDynamicHandlers" method in the "BasePipelineFactory" class for more info.
That's exactly what i was looking for.
Thanks.
Hi,
I am using traccar as a library underneath my application, I have it running fine with the ports accepting data. I have read the documentation on event forwarding and it appears can only forward to urls.
Any idea's on how to forward the event's to a service that will then put the data on a apache kafka que.
Kind Regards,