Skip to content

Latest commit

 

History

History
57 lines (40 loc) · 1.61 KB

README.md

File metadata and controls

57 lines (40 loc) · 1.61 KB

PubSub Publisher example for Retail

This is a pubsub publisher for retail usecase on bigdata.

Set up your environment

Tools

  1. Install Java 8

  2. Install Maven (for windows, mac, linux)

  3. Install Google Cloud SDK

  4. Install an IDE such as Eclipse or IntelliJ (optional)

  5. To test your installation, open a terminal window and type:

    $ java -version
    $ mvn --version
    $ gcloud --version

Google Cloud

  1. Go to https://cloud.google.com/console.****
  2. Enable billing and create a project.
  3. Enable Google PubSub API

Getting Started

How to run the code, currently only project, topic and messages per second are supported variables

mvn compile exec:java \
         -Dexec.mainClass=com.google.ce.demos.dataflow.abandonedcarts.producer.PublisherPubSub \
         -Dexec.args="--project=YOUR_PROJECT \
         --topic=YOUR_TOPIC \
         --messagesPerSecond=MSGS_PER_SECOND \
         --simulateAutoscaling=false

License

This project is licensed under the MIT License

mvn compile exec:java
-Dexec.mainClass=com.google.ce.demos.dataflow.abandonedcarts.producer.PublisherPubSub
-Dexec.args="--project=gricardo-brasil3
--topic=retailer-new-topic
--messagesPerSecond=10
--simulateAutoscaling=false"