Skip to content

Commit a15b33d

Browse files
committed
Updated README, cleaned up properties and dockerfiles
1 parent f0d1547 commit a15b33d

File tree

9 files changed

+41
-32
lines changed

9 files changed

+41
-32
lines changed

README.md

+19-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pubsubly
22

3-
[![Build Status](https://travis-ci.com/wkennedy/pubsubly.svg?branch=master)](https://travis-ci.com/wkennedy/pubsubly)
3+
![Java CI](https://github.com/wkennedy/pubsubly/workflows/Java%20CI/badge.svg?branch=dynamic_topics)
44

55
## What is it?
66

@@ -30,18 +30,18 @@ Then from pubsubly/docker run:
3030
Once everything is up and running you can navigate to http://localhost:3001 and see the Pubsubly UI interface.
3131

3232
## Quickstart - Local
33-
First follow the build instructions for building pubsubly-api and pubsubly-service below ([How to build](#how-to-build)).
34-
Once you clone the repo, if you don't already have access to Kafka brokers you can start Kafka with the docker-compose.yml file in pubsubly/docker:
33+
Once you clone the repo, if you don't already have access to Kafka brokers you can start Kafka with the docker-compose-kafka.yml file in pubsubly/docker.
34+
First you need to create a network that is used by Kafka and Pubsubly, then you need to start the services:
3535

36-
docker-compose up
36+
docker network create pubsubly-network
3737

3838
docker-compose -f docker-compose-kafka.yml -f docker-compose.yml up
3939

40-
If you aren't running Kafka locally, then you'll have update the application.yml with the broker URLs. In the application.yml in the pubsubly-service resources, update:
40+
If you aren't running Kafka locally, then you'll have update the application.yml with the broker URLs. In the application.yml in the pubsubly/docker/ folder resources, update:
4141

4242
spring:
4343
kafka:
44-
bootstrap-servers: localhost:9092
44+
bootstrap-servers: <IP or hostname of Kafka broker>:9092
4545
4646
Also update the topics you want to listen to either with a pattern OR topic names:
4747

@@ -51,14 +51,9 @@ or
5151

5252
kafka.topic.names:
5353

54-
Then you can start the server either through you Spring-Boot supported IDE or from the pubsubly-service root:
55-
56-
mvn spring-boot:run
57-
58-
To run the pubsubly-ui go to the pubsubly-ui root and do:
54+
Then you can start the server through docker-compose:
5955

60-
npm install
61-
npm run dev
56+
docker-compsose -f docker-compose.yml up
6257

6358
Then navigate to localhost:3001 in your browser.
6459

@@ -108,6 +103,10 @@ This demo demonstrates the use of 3 different messaging platforms and the abilit
108103
The demo runs a basic simulator that produces events. The event chains are triggered every 60 seconds and they simulate the creation of a user, the user getting a session stored in Redis and the sending of user data to a legacy system using ActiveMQ.
109104
The simulation also shows a series of bids and asks on a product, eventually resulting in a match which creates an order.
110105

106+
To run the demo execute the following from pubsubly/docker:
107+
108+
docker-compose -f docker-compose-demo.yml up
109+
111110
![Image](images/home_page.PNG?raw=true)
112111
This image shows the home page. The home page consists of a bar graph that shows the topics and the amount of messages from each topic. It also has a bubble chart that depicts the amount of messages processed per day per hour. This is to bring any attention to times of the day where message flow is high.
113112
The "Latest messages" section is a live display of the last 50 messages processed. The charts do not automatically update, so the page needs to be refreshed to reflect the latest numbers.
@@ -134,6 +133,10 @@ Now let's go to the menu in the upper left corner and click the search button in
134133

135134
The search page allows you to search by specific tag values, header keys and values, or text within the payload. In this example we performed a search for messages that contained the text "Yeezy".
136135

136+
![Image](images/kafka_listeners.PNG?raw=true)
137+
138+
The listeners page allows you to add and remove additional Kafka topic names or topic patterns.
139+
Messages will automatically start being consumed from topics matching the new names or patterns.
137140

138141
## How to build
139142

@@ -181,6 +184,9 @@ The main configuration for Pubsubly is setting the plugin-processors. The proces
181184
- id: eventName
182185
value: eventName
183186
description: This is the event name
187+
patternValueMonitors:
188+
- regexPattern: The regex pattern you want to match for this value, example '.*ERROR.*'
189+
priority: Possible values - NORMAL, LOW, MEDIUM, HIGH
184190
- id: sku
185191
value: sku
186192
description: ID of the product
File renamed without changes.

docker/docker-compose-demo.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ services:
9090
# - "15672:15672"
9191

9292
pubsubly-service:
93-
image: "waggins/pubsubly-service:v4"
93+
image: "waggins/pubsubly-service:v1.1"
9494
networks:
9595
- pubsubly-network
9696
ports:
@@ -108,7 +108,7 @@ services:
108108
- SPRING_PROFILES_ACTIVE=demo
109109

110110
pubsubly-ui:
111-
image: "waggins/pubsubly-ui:v2"
111+
image: "waggins/pubsubly-ui:v1.1"
112112
networks:
113113
- pubsubly-network
114114
ports:

docker/docker-compose.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ version: '3.5'
33
services:
44

55
pubsubly-service:
6-
image: "waggins/pubsubly-service:v4"
6+
image: "waggins/pubsubly-service:v1.1"
77
networks:
8-
- service-pubsubly-network
8+
- service_pubsubly-network
99
ports:
1010
- "9000:9000"
1111
volumes:
1212
- ./config:/config
1313
environment:
14-
- SPRING_CONFIG_LOCATION=file:/config/application-local.yml
14+
- SPRING_CONFIG_LOCATION=file:/config/application.yml
1515
- SPRING_PROFILES_ACTIVE=example
1616

1717
pubsubly-ui:
18-
image: "waggins/pubsubly-ui:v2"
18+
image: "waggins/pubsubly-ui:v1.1"
1919
networks:
20-
- service-pubsubly-network
20+
- service_pubsubly-network
2121
ports:
2222
- "3001:3001"
2323
links:
@@ -26,6 +26,6 @@ services:
2626
- pubsubly-service
2727

2828
networks:
29-
service-pubsubly-network:
29+
service_pubsubly-network:
3030
external:
3131
name: pubsubly-network

images/kafka_listeners.PNG

122 KB
Loading

pubsubly-service/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#version 1.1
12
FROM java:8
23
VOLUME /tmp
34
ADD /target/pubsubly-service.jar app.jar

pubsubly-service/DockerfileDemo

-5
This file was deleted.

pubsubly-service/pom.xml

+11-6
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,16 @@
203203
</build>
204204

205205
<repositories>
206-
<repository>
207-
<id>github</id>
208-
<name>GitHub wkennedy Apache Maven Packages</name>
209-
<url>https://maven.pkg.github.com/wkennedy/pubsubly</url>
210-
</repository>
211-
</repositories>
206+
<repository>
207+
<id>oss.sonatype.org-snapshot</id>
208+
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
209+
<releases>
210+
<enabled>false</enabled>
211+
</releases>
212+
<snapshots>
213+
<enabled>true</enabled>
214+
</snapshots>
215+
</repository>
216+
</repositories>
212217

213218
</project>

pubsubly-ui/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#version 1.1
2+
13
FROM node:10
24

35
# Setting working directory. All the path will be relative to WORKDIR

0 commit comments

Comments
 (0)