Giter VIP home page Giter VIP logo

tyskafkasample's People

Contributors

bmos299 avatar

Stargazers

 avatar

Watchers

 avatar

tyskafkasample's Issues

update readme with some more info, like this....

Installing Kafka Transaction driver

Create a Kafka / Eventstreams development instance. I used IBM's Cloud Pak for Integration's EventStreams
NOTE ** If you use Cloud Pak for Integration the quickstart deployment will not work.
Create a topic ... we use mosparz
Go to "connect to this cluster"
Generate a scram-user... we use scram-user as the user name
Copy the scram-user password and put it in the kafkaproducer.js file as 'sasl.password'
Download the .pem file

Get the Kafka listener and credentials, next to the scram you just generated. Should look like this:
kafka-dev-kafka-bootstrap-cp4i.marks-kafka2-1e3af63cfXXXXXXXX98d645120e18baf-0000.us-south.containers.appdomain.cloud:443
use this in the kafkaproducer.js as the metadata.broker.list

Clone(this repo) https://github.com/bmos299/TYSKafKaSample

run:

npm install node-rdkafka

replace the es-cert.pem in the directory with the one you downloaded above

You need to use node version 12.13.1 or you will see the error noted at the bottom of this readme

Use 2 terminal windows. in the first
run

node kafkaconsumer.js

NOTE: see below if you get a node error, sometimes the machine resets itself to a bad node version.

In the second terminal you have the option to run a single message or multiple

For a single message run

node kafkaproducer_single_message.js

For a several messages, run

node kafkaproducer_multiple_message.js

Once your run one of the producers you should see a message come across with some values and says "Message I want to send Barry"

This means you have successfully sent a message thru the Kafka queues and back.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.