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
1 parent
cc10f7d
commit 0eb0a3c
Showing
57 changed files
with
180 additions
and
133 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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
channels/journey_speech/google-application-credentials.json
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 @@ | ||
{ | ||
"type": "service_account", | ||
"project_id": "treeassistant-tatan", | ||
"private_key_id": "c17762b3284ad4b2892da86b5acad31d81456480", | ||
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCxPkpEu2F/AgfT\nRN1E6d3AWKuUlN6EvWtbMkzJBTVPNE3dHNYwmXv+BdiPr63ZBIruRGngkzmlTWmA\nBnXzxL62ddyUUAGMix0Ei6iI9Dd31YUf8fpxfoesckoTVPVygIVjxaN9a3Bp3vl5\nHffGcMYCJqUjEempno0B4OM+d4NY4Z7giBkUrTJ1OPKWFwJm0EGHVoO+mmMLlnoj\ny4ybKlxzbY67jFRD6x4Ua9q5G3D19h2Xi1GnySIKhwCGRCcl6CIPJr0hJxyBzHS0\ny40QnBPYLL9cM8t8bUuMMvjWyz8On075aEyaUuqSrUE8aLn5vFBSiKHG6f+UFi/8\nW+YwEmxzAgMBAAECggEAB+t3a7ICKnSvkm2MHZCXPtY3d7PEBaMyvg51ukqOfHPv\n240QUERr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zjI54MZqgfjcN68C1zm8Y6TZ9lBGkkGHOoRVolCY5QLTrgeFzCoTC\ns+uhss9CEewRJs8OxxfnAr373JG8ZiGIrw4PHFG3hlPiCCNKoOarEhWT09EAOPY0\ng/LjdJToLWRghp3sFC4v6FUKTA==\n-----END PRIVATE KEY-----\n", | ||
"client_email": "treetester@treeassistant-tatan.iam.gserviceaccount.com", | ||
"client_id": "109961751830646460170", | ||
"auth_uri": "https://accounts.google.com/o/oauth2/auth", | ||
"token_uri": "https://oauth2.googleapis.com/token", | ||
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", | ||
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/treetester%40treeassistant-tatan.iam.gserviceaccount.com" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,21 @@ | ||
class JourneyChannel: | ||
def __init__(self, name__): | ||
self.name = name__ | ||
self._sessions = dict() | ||
|
||
def start(self): | ||
pass | ||
|
||
def send_message(self, originator_id, message): | ||
print("Received message: " + message) | ||
pass | ||
|
||
def process_message(self, func): | ||
def wrapper(): | ||
|
||
func(session, message) | ||
print("after") | ||
return wrapper | ||
|
||
def get_session(self, dialogue_id): | ||
return self._sessions[dialogue_id] |
Empty file.
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,25 @@ | ||
version: '3.3' | ||
|
||
services: | ||
zookeeper: | ||
image: confluentinc/cp-zookeeper:latest | ||
environment: | ||
ZOOKEEPER_CLIENT_PORT: 2181 | ||
ZOOKEEPER_TICK_TIME: 2000 | ||
ports: | ||
- 22181:2181 | ||
|
||
kafka: | ||
image: confluentinc/cp-kafka:latest | ||
depends_on: | ||
- zookeeper | ||
ports: | ||
- 29092:29092 | ||
environment: | ||
KAFKA_BROKER_ID: 1 | ||
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | ||
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092 | ||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT | ||
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT | ||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | ||
|
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
Empty file.
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,3 @@ | ||
class KafkaProducer: | ||
def __init__(self): | ||
pass |
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,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module type="PYTHON_MODULE" version="4"> | ||
<component name="NewModuleRootManager" inherit-compiler-output="true"> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$" /> | ||
<orderEntry type="jdk" jdkName="Python 3.10 (Journey Project)" jdkType="Python SDK" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
</component> | ||
</module> |
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,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module type="PYTHON_MODULE" version="4"> | ||
<component name="NewModuleRootManager" inherit-compiler-output="true"> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$" /> | ||
<orderEntry type="jdk" jdkName="Python 3.10 (Journey Project)" jdkType="Python SDK" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
</component> | ||
</module> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
journey_central/.gradle/7.3.2/executionHistory/executionHistory.lock
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
journey_central/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file not shown.
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
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 @@ | ||
{ | ||
"type": "service_account", | ||
"project_id": "treeassistant-tatan", | ||
"private_key_id": "c17762b3284ad4b2892da86b5acad31d81456480", | ||
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCxPkpEu2F/AgfT\nRN1E6d3AWKuUlN6EvWtbMkzJBTVPNE3dHNYwmXv+BdiPr63ZBIruRGngkzmlTWmA\nBnXzxL62ddyUUAGMix0Ei6iI9Dd31YUf8fpxfoesckoTVPVygIVjxaN9a3Bp3vl5\nHffGcMYC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xD8tsP2qLLLO+LdLeXHhdi88K8PVa5RV6jXp5SfwKBgQCs\nQ/wmKTEO0xlnc8mWgH0GiY+//YWMwwjV9PbKnQ6rItntW+mLU7UKCY1N+TfwHwFa\nv8xDt9uLccE/MezDh7orkDxlh5Zp3cBhTPmOeokwMZ7bcgQTBfKbfoT1Hvbc2rN5\nrzdmmt5zqxL0llHnbnSUB2RY7+MUkDXtkFDDtGf8cQKBgQCAescmKqvwC+rXJb1c\nU+HOS9DJMzQzjI54MZqgfjcN68C1zm8Y6TZ9lBGkkGHOoRVolCY5QLTrgeFzCoTC\ns+uhss9CEewRJs8OxxfnAr373JG8ZiGIrw4PHFG3hlPiCCNKoOarEhWT09EAOPY0\ng/LjdJToLWRghp3sFC4v6FUKTA==\n-----END PRIVATE KEY-----\n", | ||
"client_email": "treetester@treeassistant-tatan.iam.gserviceaccount.com", | ||
"client_id": "109961751830646460170", | ||
"auth_uri": "https://accounts.google.com/o/oauth2/auth", | ||
"token_uri": "https://oauth2.googleapis.com/token", | ||
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", | ||
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/treetester%40treeassistant-tatan.iam.gserviceaccount.com" | ||
} |
20 changes: 20 additions & 0 deletions
20
journey_central/src/main/java/com/journey/central/journey/service/KafkaConsumer.java
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,20 @@ | ||
package com.journey.central.journey.service; | ||
|
||
import org.apache.kafka.clients.producer.Producer; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.kafka.annotation.KafkaListener; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.io.IOException; | ||
|
||
@Service | ||
public class KafkaConsumer { | ||
private final Logger logger = LoggerFactory.getLogger(Producer.class); | ||
|
||
|
||
@KafkaListener(topics = "users", groupId = "group_id") | ||
public void consume(String message) throws IOException { | ||
logger.info(String.format("#### -> Consumed message -> %s", message)); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
journey_central/src/main/java/com/journey/central/journey/service/KafkaProducer.java
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,27 @@ | ||
package com.journey.central.journey.service; | ||
|
||
import org.apache.kafka.clients.producer.Producer; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.kafka.annotation.KafkaHandler; | ||
import org.springframework.kafka.annotation.KafkaListener; | ||
import org.springframework.kafka.core.KafkaTemplate; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.io.IOException; | ||
|
||
@Service | ||
public class KafkaProducer { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(Producer.class); | ||
private static final String TOPIC = "users"; | ||
|
||
@Autowired | ||
private KafkaTemplate<String, String> kafkaTemplate; | ||
|
||
public void sendMessage(String message) { | ||
logger.info(String.format("#### -> Producing message -> %s", message)); | ||
this.kafkaTemplate.send(TOPIC, message); | ||
} | ||
} |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.