You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "Tauzell, Dave" <Da...@surescripts.com> on 2019/01/25 14:18:38 UTC

Re: [External] Re: Newbie question using Kafka Producers in Web apps

We are using both and leaning towards a web service fronting Kafka because it gives us the ability to centralize other logic.   That said, I don't think the webservice will be much more "stable" and you'll need to consider what to do with your audit records if the web service call fails.

-Dave

On 1/25/19, 12:07 AM, "Michael Eugene" <fa...@hotmail.com> wrote:

    I don’t feel it would be a big hit in performance because Kafka works very fast. I think the speed difference would be negligible. Why are you worried about stability? I’m just curious because it doesn’t seem like it would be unstable, but maybe it would be a bit overkill for one app and some decoupling might make sense.

    Sent from my iPhone

    > On Jan 24, 2019, at 9:59 PM, Raghavendran Chellappa <ra...@gmail.com> wrote:
    >
    > Hi All,
    > We have a Spring based web app.
    >
    > We are planning to build an 'Audit Tracking' feature and plan to use Kafka
    > - as a sink for storing Audit messages (which will then be consumed and
    > persisted to a common DB).
    >
    >
    >
    > We are planning to build a simple, ‘pass-through’ REST service which will
    > take a JSON and push it into the appropriate Kafka topic.
    >
    > This REST service will be called from various pages (from server side) in
    > the web app (during Create, View, Edit actions) to store the Audit entries.
    >
    >
    >
    > My question is can we directly have Kafka Producers in the web app so that
    > we post messages to Kafka Topic directly (instead of going through a
    > Webservice)?
    >
    > Will adding a Kafka Producer in web app will make the app less stable (make
    > pages less performant)? This is one of the reasons why we want to hide the
    > Kafka producer complexity behind the webservice. Also we feel that this
    > webservice can be a starting point for a generic “Auditing service” that
    > can be used by other applications, in the enterprise, in the future.
    >
    >
    >
    > I think the ‘pass-through’ webservice is not required and it is OK to push
    > messages directly from web app to Kafka (but unable to point to any
    > examples of this being done or any benefits of doing so).
    >
    >
    >
    > What do you think?
    >
    >
    >
    > Thanks,
    >
    > Ragha


This e-mail and any files transmitted with it are confidential, may contain sensitive information, and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender by reply e-mail immediately and destroy all copies of the e-mail and any attachments.