Skip to content

Commit

Permalink
Cleanup Examples and test configurations.
Browse files Browse the repository at this point in the history
  • Loading branch information
pasimoes committed Aug 15, 2024
1 parent bef51d5 commit a0b5fba
Show file tree
Hide file tree
Showing 19 changed files with 20 additions and 1,278 deletions.
26 changes: 5 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,29 +128,13 @@ gradle javadoc

## Examples

Repository contains 7 common OKafka application examples in `examples` folder.
Repository contains 2 common OKafka application examples in `examples` folder.

`1. CreateTopic.java` -
Connects to Oracle Database and create a topic TXEQ with 10 partitions with default retention time of 7 days.
`1. ProducerOKafka.java`
Produces 10 messages into TxEQ topic.

`2. DeleteTopic.java`
Deletes already created OKafka topic.

`3. SimpleProducer.java`
Produces 100 messages into TxEQ topic.

`4. SimpleConsumer.java`
Consumes 100 messages from TxEQ topic.

`5. TransactionalProducer.java`
Retrieves the Oracle Database Connection object from OKafka producer. Atomically performs a DML operation and sends a record.

`6. TransactionalConsumer.java`
Retrieves the Oracle Database Connection object from OKafka consumer. Atomically consumes a batch of records and perform DML operation for each record.


`7. TransactionalProduceConsume.java`
Atomically consumes a batch of messages from TXEQ topic using OKafka Consumer, processes records from the batch and produces them in the tpic TxEQ_2 using OKafka Producer. To achieve atomicity for this these consume-process-produce operations, application retrieves the Oracle Database Connection object from OKafka Consumer and pass it to create an OKafka Producer.
`2. ConsumerOKafka.java`
Consumes 10 messages from TxEQ topic.

## Kafka Java Client APIs supported

Expand Down
79 changes: 0 additions & 79 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -203,85 +203,6 @@ project(':examples:producer') {
}
}

project(':examples:TxProducer') {
apply plugin : 'java'
apply plugin : 'application'

sourceCompatibility = minJavaVersion
targetCompatibility = minJavaVersion

dependencies {
// These dependencies are used by the application.
implementation project(':clients')
implementation group: 'com.oracle.database.security', name: 'oraclepki', version: '23.4.0.24.05'
implementation group: 'org.apache.kafka', name: 'kafka-clients', version: '3.7.1'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.5.6'
}

tasks.named('jar') {
description('Generates OKafka Transactional Producer jar ')
archiveBaseName = 'okafka'
archiveClassifier = 'txproducer'

from "${rootProject.projectDir}/LICENSE.txt"
from "${rootProject.projectDir}/NOTICE"

manifest {
attributes(
'Implementation-Title' : 'OKafka Transactional Producer',
'Implementation-Version': project.version
)
}
}

tasks.named('run') {
description('Run OKafka Transactional Producer')
application {
mainClass = 'org.oracle.okafka.examples.TransactionalProducerOKafka'
}
}
}

project(':examples:TxConsumer') {
apply plugin : 'java'
apply plugin : 'application'

sourceCompatibility = minJavaVersion
targetCompatibility = minJavaVersion

dependencies {
// These dependencies are used by the application.
implementation project(':clients')
implementation group: 'com.oracle.database.security', name: 'oraclepki', version: '23.4.0.24.05'
implementation group: 'org.apache.kafka', name: 'kafka-clients', version: '3.7.1'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.5.6'
}


tasks.named('jar') {
description('Generates OKafka Transactional Consumer jar ')
archiveBaseName = 'okafka'
archiveClassifier = 'txconsumer'

from "${rootProject.projectDir}/LICENSE.txt"
from "${rootProject.projectDir}/NOTICE"

manifest {
attributes(
'Implementation-Title' : 'OKafka Transactional Consumer',
'Implementation-Version': project.version
)
}
}

tasks.named('run') {
description('Run OKafka Transactional Consumer')
application {
mainClass = 'org.oracle.okafka.examples.TransactionalConsumerOKafka'
}
}
}

configurations {
childJar
}
Expand Down

This file was deleted.

36 changes: 0 additions & 36 deletions examples/TxConsumer/src/main/resources/config.properties

This file was deleted.

Loading

0 comments on commit a0b5fba

Please sign in to comment.