Add kafka. | asdfasdfasdfasdfasdfasdfadsf (C) whatthecommit.com
This commit is contained in:
13
.travis.yml
13
.travis.yml
@@ -37,10 +37,13 @@ before_install:
|
||||
- source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/main.bash)
|
||||
- stop_any 9092 2181 80 8001 8002 8080 5432
|
||||
before_script:
|
||||
- if [[ ! -d ~/.c ]] ; then git clone --depth=1 https://github.com/confluentinc/cp-docker-images.git ~/.c ; fi
|
||||
- docker-compose -f ~/.c/examples/kafka-single-node/docker-compose.yml up -d
|
||||
# - git clone --depth=1 https://github.com/confluentinc/cp-docker-images.git $HOME/.k || echo 'oops...'
|
||||
- (test -d "$HOME/.k") || (git clone --depth=1 https://github.com/confluentinc/cp-docker-images.git $HOME/.k || echo 'oops...')
|
||||
- docker-compose -f $HOME/.k/examples/kafka-single-node/docker-compose.yml up -d
|
||||
after_script:
|
||||
- docker-compose -f ~/.c/examples/kafka-single-node/docker-compose.yml down -v --rmi local
|
||||
- stop_any 80 8080
|
||||
- docker-compose -f $HOME/.k/examples/kafka-single-node/docker-compose.yml down -v --rmi local
|
||||
- ./gradlew --stop || echo 'oops...'
|
||||
jobs:
|
||||
include:
|
||||
- stage: test
|
||||
@@ -57,7 +60,6 @@ jobs:
|
||||
- http post :8080/api/v1/messages message=ololo
|
||||
- http post :8080/api/v1/messages message=ololo not=found
|
||||
- http get :8080/api/v1/messages
|
||||
- stop_any 80 8080
|
||||
- stage: test
|
||||
jdk: openjdk11
|
||||
name: integration tests (openjdk11)
|
||||
@@ -72,14 +74,13 @@ jobs:
|
||||
- http post :8080/api/v1/messages message=ololo
|
||||
- http post :8080/api/v1/messages message=ololo not=found
|
||||
- http get :8080/api/v1/messages
|
||||
- stop_any 80 8080
|
||||
cache:
|
||||
directories:
|
||||
- ~/.embedmongo
|
||||
- ~/.gradle
|
||||
- ~/.docker
|
||||
- ~/.m2
|
||||
- ~/.c
|
||||
- ~/.k
|
||||
packages: true
|
||||
pip: true
|
||||
|
||||
|
||||
10
build.gradle
10
build.gradle
@@ -5,6 +5,10 @@ plugins {
|
||||
id 'idea'
|
||||
}
|
||||
|
||||
ext {
|
||||
set('springCloudVersion', "Hoxton.M1")
|
||||
}
|
||||
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
group = 'com.github.daggerok.eventsourcing'
|
||||
@@ -17,6 +21,12 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(platform("org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"))
|
||||
implementation 'org.springframework.cloud:spring-cloud-stream'
|
||||
// implementation 'org.springframework.cloud:spring-cloud-stream-reactive'
|
||||
implementation 'org.springframework.cloud:spring-cloud-stream-binder-kafka'
|
||||
testImplementation 'org.springframework.cloud:spring-cloud-stream-test-support'
|
||||
|
||||
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-webflux'
|
||||
implementation 'org.codehaus.groovy:groovy'
|
||||
|
||||
@@ -2,8 +2,11 @@ package com.github.daggerok.eventsourcing
|
||||
|
||||
import org.springframework.boot.SpringApplication
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.cloud.stream.annotation.EnableBinding
|
||||
import org.springframework.cloud.stream.messaging.Processor
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableBinding(Processor.class)
|
||||
class UserServiceApplication {
|
||||
|
||||
static void main(String[] args) {
|
||||
|
||||
@@ -1,2 +1,12 @@
|
||||
spring.main.lazy-initialization=false
|
||||
spring.output.ansi.enabled=always
|
||||
|
||||
#spring.cloud.stream.kafka.bindings.input.consumer.configuration.foo=bar
|
||||
#spring.cloud.stream.kafka.bindings.input.consumer.topic.properties.message.format.version=0.9.0.0
|
||||
|
||||
spring.cloud.stream.bindings.input.content-type=application/json
|
||||
spring.cloud.stream.bindings.input.destination=user
|
||||
spring.cloud.stream.bindings.input.group=user-messages-consumer-group
|
||||
|
||||
spring.cloud.stream.bindings.output.content-type=application/json
|
||||
spring.cloud.stream.bindings.output.destination=user
|
||||
|
||||
Reference in New Issue
Block a user