-
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
This sample assumes Apache Kafka | ||
For more information on Kafka, refer to http://kafka.apache.org/documentation.html | ||
If Kafka is running at its default host and port localhost:9092, you will need to adjust | ||
parameter bootstrap.servers in a configuration file specified by the init paramter | ||
org.atmosphere.kafka.propertiesFile. | ||
|
||
Run this sample twice with this command lines : | ||
- 1st instance : mvn jetty:run-war -Djetty.port=8080 | ||
- 2nd instance : mvn jetty:run-war -Djetty.port=9090 | ||
|
||
You can use your browser to connect to either http://localhost:8080 or http://localhost:9090 and | ||
observe the messages posted to the same topic are broadcasted to its subscribers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<parent> | ||
<groupId>org.atmosphere</groupId> | ||
<artifactId>atmosphere-samples-project</artifactId> | ||
<version>2.5.0-SNAPSHOT</version> | ||
<relativePath>../../../</relativePath> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
<artifactId>atmosphere-kafka-demo</artifactId> | ||
<packaging>war</packaging> | ||
<name>atmosphere-kafka-demo</name> | ||
<properties> | ||
<extensions-version>2.5.0-SNAPSHOT</extensions-version> | ||
</properties> | ||
<build> | ||
<defaultGoal>install</defaultGoal> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>2.4</version> | ||
<configuration> | ||
<overlays> | ||
<overlay> | ||
<groupId>org.atmosphere.samples</groupId> | ||
<artifactId>atmosphere-jersey-pubsub</artifactId> | ||
</overlay> | ||
</overlays> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.atmosphere</groupId> | ||
<artifactId>atmosphere-kafka</artifactId> | ||
<version>${extensions-version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.atmosphere.samples</groupId> | ||
<artifactId>atmosphere-jersey-pubsub</artifactId> | ||
<version>${project.version}</version> | ||
<type>war</type> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.geronimo.specs</groupId> | ||
<artifactId>geronimo-servlet_3.0_spec</artifactId> | ||
<version>1.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |