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
version: "3.9" | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:latest | |
restart: always | |
hostname: zookeeper | |
container_name: zookeeper | |
ports: | |
- "2181:2181" | |
environment: |
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
<plugin> | |
<groupId>org.apache.avro</groupId> | |
<artifactId>avro-maven-plugin</artifactId> | |
<version>1.8.2</version> | |
<executions> | |
<execution> | |
<id>schemas</id> | |
<phase>generate-sources</phase> | |
<goals> | |
<goal>schema</goal> |
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
{ | |
"type": "record", | |
"namespace": "com.example.restaurant.avro.schema", | |
"name": "OrderAvro", | |
"fields": [ | |
{ | |
"name": "eventType", | |
"type": "string", | |
"default": "ORDER_CREATED" | |
}, |
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
import com.example.restaurant.avro.schema.OrderAvro; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.kafka.core.KafkaTemplate; | |
import org.springframework.kafka.support.SendResult; | |
import org.springframework.stereotype.Service; | |
import org.springframework.util.concurrent.ListenableFuture; | |
import org.springframework.util.concurrent.ListenableFutureCallback; |
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
import com.example.restaurant.avro.schema.OrderAvro; | |
import com.example.restaurant.mapper.OrderMapper; | |
import com.example.restaurant.models.EventTypes; | |
import com.example.restaurant.models.OrderModel; | |
import com.example.restaurant.serviceimpl.OrderServiceImpl; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.kafka.annotation.KafkaListener; | |
import org.springframework.stereotype.Service; |
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
import com.example.restaurant.avro.schema.OrderAvro; | |
import com.example.restaurant.kafka.AvroProducer; | |
import com.example.restaurant.mapper.OrderMapper; | |
import com.example.restaurant.models.EventTypes; | |
import com.example.restaurant.models.OrderModel; | |
import com.example.restaurant.models.OrderStatus; | |
import com.example.restaurant.repository.OrderRepo; | |
import com.example.restaurant.request.OrderRequest; | |
import com.example.restaurant.service.OrderService; |
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
public enum EventTypes { | |
ORDER_CREATED, | |
ORDER_SERVING, | |
ORDER_CANCELLED, | |
ORDER_SERVED, | |
ORDER_UPDATED, | |
ORDER_DELETED | |
} |
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
#!/bin/sh | |
#################################################################################### | |
# | |
# Download Compile and Install BitchX on Ubuntu | |
# | |
#################################################################################### | |
# download bitchx source | |
# @todo make smarter, i.e. regexp, though now uses _always_ available commands (sic) |
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
package com.example.demohaproxy; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
@SpringBootApplication | |
@RestController |
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
FROM openjdk:8-jdk-alpine | |
ARG JAR_FILE=target/*.jar | |
COPY ${JAR_FILE} app.jar | |
ENTRYPOINT ["java","-jar","/app.jar"] |
OlderNewer